@misha_misha/agentwatch 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -31
- package/bin/agentwatch.js +0 -0
- package/dist/index.js +8277 -5193
- package/dist/web/assets/ActiveShapeUtils-CtEvtbYg.js +1 -0
- package/dist/web/assets/Bar-DEgd_1jq.js +1 -0
- package/dist/web/assets/BarChart-CLHGmIz1.js +1 -0
- package/dist/web/assets/CartesianChart-DgJKUG1O.js +1 -0
- package/dist/web/assets/CategoricalChart-DEGrE0Qv.js +33 -0
- package/dist/web/assets/ErrorBarContext-BMnGmrrB.js +1 -0
- package/dist/web/assets/Legend-CEa2zCmi.js +4 -0
- package/dist/web/assets/Line-CCyE37cb.js +1 -0
- package/dist/web/assets/LineChart-DmMubyEd.js +1 -0
- package/dist/web/assets/ProjectActivity-BG5hEcJl.js +1 -0
- package/dist/web/assets/ProjectYield-vVxXaT6e.js +1 -0
- package/dist/web/assets/SessionActivity-BUzJpWwc.js +1 -0
- package/dist/web/assets/SessionCompaction-Dx3tbM9N.js +1 -0
- package/dist/web/assets/SessionDiffs-CDUkVqua.js +65 -0
- package/dist/web/assets/SessionGraph-DWP1YyP0.js +1 -0
- package/dist/web/assets/SessionReplay-kz1EhiaI.js +1 -0
- package/dist/web/assets/SessionTokens-BjuXcVM2.js +1 -0
- package/dist/web/assets/SessionYield-DXF-Xb5T.js +1 -0
- package/dist/web/assets/Settings-CXCDYvsc.js +1 -0
- package/dist/web/assets/Trends-wdNqOtnn.js +1 -0
- package/dist/web/assets/arrow-left-B-iQ08P0.js +1 -0
- package/dist/web/assets/chart-column-BwF4X7mz.js +1 -0
- package/dist/web/assets/clsx-DnEFlO87.js +1 -0
- package/dist/web/assets/createLucideIcon-Bjwrp8ZV.js +8 -0
- package/dist/web/assets/dist-BYqqB4pa.js +1 -0
- package/dist/web/assets/file-pen-CHXP3wF7.js +1 -0
- package/dist/web/assets/format-zsCsqELF.js +1 -0
- package/dist/web/assets/getRadiusAndStrokeWidthFromDot-CFcPogcT.js +1 -0
- package/dist/web/assets/graphicalItemSelectors-DJeUEv0O.js +1 -0
- package/dist/web/assets/index-CJArQihV.js +2 -0
- package/dist/web/assets/index-CTAomrBX.css +1 -0
- package/dist/web/assets/play-ONoP4Jfr.js +1 -0
- package/dist/web/assets/tooltipContext-BT7phkqZ.js +1 -0
- package/dist/web/assets/triangle-alert-BhvAiLmv.js +1 -0
- package/dist/web/assets/useMutation-CfQYV-vU.js +1 -0
- package/dist/web/index.html +28 -0
- package/package.json +27 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SessionTokens-BjuXcVM2.js","assets/createLucideIcon-Bjwrp8ZV.js","assets/CategoricalChart-DEGrE0Qv.js","assets/clsx-DnEFlO87.js","assets/dist-BYqqB4pa.js","assets/arrow-left-B-iQ08P0.js","assets/CartesianChart-DgJKUG1O.js","assets/getRadiusAndStrokeWidthFromDot-CFcPogcT.js","assets/Legend-CEa2zCmi.js","assets/graphicalItemSelectors-DJeUEv0O.js","assets/format-zsCsqELF.js","assets/SessionCompaction-Dx3tbM9N.js","assets/Line-CCyE37cb.js","assets/ActiveShapeUtils-CtEvtbYg.js","assets/ErrorBarContext-BMnGmrrB.js","assets/LineChart-DmMubyEd.js","assets/SessionGraph-DWP1YyP0.js","assets/SessionDiffs-CDUkVqua.js","assets/file-pen-CHXP3wF7.js","assets/SessionReplay-kz1EhiaI.js","assets/useMutation-CfQYV-vU.js","assets/play-ONoP4Jfr.js","assets/SessionActivity-BUzJpWwc.js","assets/Bar-DEgd_1jq.js","assets/tooltipContext-BT7phkqZ.js","assets/BarChart-CLHGmIz1.js","assets/ProjectActivity-BG5hEcJl.js","assets/SessionYield-DXF-Xb5T.js","assets/ProjectYield-vVxXaT6e.js","assets/Trends-wdNqOtnn.js","assets/chart-column-BwF4X7mz.js","assets/Settings-CXCDYvsc.js","assets/triangle-alert-BhvAiLmv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{A as e,C as t,D as n,M as r,O as i,P as a,S as o,_ as s,a as c,b as l,c as u,d,f,g as p,h as ee,i as m,j as te,k as h,m as ne,n as g,p as re,r as ie,s as ae,t as _,v as oe,w as se,x as v,y as ce}from"./createLucideIcon-Bjwrp8ZV.js";import{a as le,c as ue,i as de,l as y,n as b,o as x,r as fe,s as pe,t as me}from"./dist-BYqqB4pa.js";import{n as he,t as S}from"./useMutation-CfQYV-vU.js";import{t as C}from"./arrow-left-B-iQ08P0.js";import{t as ge}from"./chart-column-BwF4X7mz.js";import{n as _e,r as ve,t as ye}from"./triangle-alert-BhvAiLmv.js";import{t as be}from"./file-pen-CHXP3wF7.js";import{t as xe}from"./play-ONoP4Jfr.js";import{t as w}from"./clsx-DnEFlO87.js";import{a as T,c as E,i as D,n as O,o as k,r as Se,s as A,t as j}from"./format-zsCsqELF.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ce=r((t=>{var n=e();t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot}));function we(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{re(e,()=>t.signal,()=>n=!0)},u=p(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ee:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Ee:Te,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Te(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Te(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ee(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var De=class extends h{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new he({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=M(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=M(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=M(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=M(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){f.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){f.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return f.batch(()=>Promise.all(e.map(e=>e.continue().catch(o))))}};function M(e){return e.options.scope?.id}var Oe=class extends h{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ce(r,t),a=this.get(i);return a||(a=new u({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){f.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>v(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>v(e,t)):t}notify(e){f.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){f.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){f.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Oe,this.#t=e.mutationCache||new De,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=i.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=d.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(se(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=s(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return f.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;f.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return f.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=f.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(o).catch(o)}invalidateQueries(e,t={}){return f.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=f.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(o)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(o)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(se(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(o).catch(o)}fetchInfiniteQuery(e){return e.behavior=we(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(o).catch(o)}ensureInfiniteQueryData(e){return e.behavior=we(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return d.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(oe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let n=[...this.#r.values()],r={};return n.forEach(n=>{t(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){this.#i.set(oe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let n=[...this.#i.values()],r={};return n.forEach(n=>{t(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ce(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===n&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},N=_(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Ae=_(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),je=_(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Me=_(`chart-pie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),Ne=_(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Pe=_(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Fe=_(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),P=_(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),F=_(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),I=_(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Ie=_(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Le=_(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),L=_(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),R=_(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Re=_(`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`}]]),ze=_(`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`}]]),z=_(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),B=_(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Be=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Ve=(e=>e?Be(e):Be),V=a(te(),1),He=e=>e;function Ue(e,t=He){let n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}var We=e=>{let t=Ve(e),n=e=>Ue(t,e);return Object.assign(n,t),n},Ge=(e=>e?We(e):We),Ke=a(Ce(),1),qe=2e3,H=Ge(e=>({events:[],initialized:!1,setInitial:t=>e({events:t,initialized:!0}),push:t=>e(e=>{if(e.events.find(e=>e.id===t.id))return{};let n=[t,...e.events];return n.length>qe&&(n.length=qe),{events:n}})})),U=0,W=null;function Je(){let{initialized:e,setInitial:t,push:n}=H();(0,V.useEffect)(()=>(e||g.events({limit:1e3}).then(e=>t(e.events)).catch(()=>t([])),U+=1,W||=ie(e=>n(e)),()=>{--U,U<=0&&W&&(W(),W=null)}),[])}var G=ae(),Ye=[{id:`nav:timeline`,title:`Timeline`,to:`/`,group:`nav`},{id:`nav:logs`,title:`Logs (disk-backed history)`,to:`/logs`,group:`nav`},{id:`nav:projects`,title:`Projects`,to:`/projects`,group:`nav`},{id:`nav:search`,title:`Search`,to:`/search`,group:`nav`},{id:`nav:agents`,title:`Agents`,to:`/agents`,group:`nav`},{id:`nav:permissions`,title:`Permissions`,to:`/permissions`,group:`nav`},{id:`nav:cron`,title:`Scheduled`,to:`/cron`,group:`nav`},{id:`nav:trends`,title:`Trends`,to:`/trends`,group:`nav`},{id:`nav:budgets`,title:`Settings · Budgets`,to:`/settings/budgets`,group:`nav`},{id:`nav:anomaly`,title:`Settings · Anomaly`,to:`/settings/anomaly`,group:`nav`},{id:`nav:triggers`,title:`Settings · Triggers`,to:`/settings/triggers`,group:`nav`}];function Xe(){let[e,t]=(0,V.useState)(!1),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(0),o=ue(),s=m({queryKey:[`projects`],queryFn:g.projects,enabled:e});(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e),r(``),a(0)),e.key===`Escape`&&t(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let c=(0,V.useMemo)(()=>(s.data?.projects??[]).map(e=>({id:`proj:${e.name}`,title:e.name,hint:`${e.eventCount} events · ${e.sessionIds.length} sessions`,to:`/projects/${encodeURIComponent(e.name)}`,group:`project`})),[s.data]),l=(0,V.useMemo)(()=>[...Ye,...c],[c]),u=(0,V.useMemo)(()=>{let e=n.trim().toLowerCase();return e?l.filter(t=>t.title.toLowerCase().includes(e)||(t.hint??``).toLowerCase().includes(e)).slice(0,30):l.slice(0,20)},[l,n]);if((0,V.useEffect)(()=>a(0),[n]),!e)return null;let d=e=>{t(!1),o(e.to)};return(0,G.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-start justify-center pt-[10vh] px-4`,onClick:()=>t(!1),children:(0,G.jsxs)(`div`,{className:`w-full max-w-xl bg-bg-surface border border-bg-border rounded-xl shadow-2xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 border-b border-bg-border`,children:[(0,G.jsx)(R,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`input`,{autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),a(e=>Math.min(e+1,u.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),a(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=u[i];t&&d(t)}},placeholder:`Jump to view, project, session…`,className:`flex-1 bg-transparent outline-none text-sm`}),(0,G.jsx)(`kbd`,{className:`text-[10px] text-fg-muted mono border border-bg-border rounded px-1`,children:`esc`})]}),(0,G.jsxs)(`div`,{className:`max-h-[60vh] overflow-y-auto py-1`,children:[u.length===0&&(0,G.jsx)(`div`,{className:`p-4 text-fg-muted text-sm text-center`,children:`no results`}),u.map((e,t)=>(0,G.jsxs)(`button`,{onClick:()=>d(e),className:w(`w-full flex items-center justify-between gap-3 px-4 py-2 text-left transition`,t===i?`bg-accent/20 text-accent`:`text-fg hover:bg-bg-elev`),onMouseEnter:()=>a(t),children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-sm`,children:e.title}),e.hint&&(0,G.jsx)(`div`,{className:`text-[11px] text-fg-muted`,children:e.hint})]}),(0,G.jsx)(`div`,{className:`text-[10px] text-fg-muted uppercase mono`,children:e.group})]},e.id))]}),(0,G.jsxs)(`div`,{className:`px-4 py-2 border-t border-bg-border flex items-center justify-between text-[11px] text-fg-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`↑↓`}),` navigate`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`↵`}),` open`]})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`⌘K`}),` toggle`]})]})]})})}function Ze(){Je();let e=m({queryKey:[`health`],queryFn:g.health,refetchInterval:1e4});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col bg-bg text-fg`,children:[(0,G.jsxs)(`header`,{className:`flex items-center gap-6 px-5 py-3 border-b border-bg-border`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(N,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`div`,{className:`font-bold`,children:`agentwatch`}),(0,G.jsx)(`div`,{className:`text-xs text-fg-dim`,children:e.data?.version?`v${e.data.version}`:``})]}),(0,G.jsxs)(`nav`,{className:`flex items-center gap-1 text-sm`,children:[(0,G.jsx)(K,{to:`/`,label:`Timeline`,icon:(0,G.jsx)(N,{className:`w-4 h-4`}),end:!0}),(0,G.jsx)(K,{to:`/logs`,label:`Logs`,icon:(0,G.jsx)(L,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/projects`,label:`Projects`,icon:(0,G.jsx)(F,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/search`,label:`Search`,icon:(0,G.jsx)(R,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/agents`,label:`Agents`,icon:(0,G.jsx)(B,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/permissions`,label:`Permissions`,icon:(0,G.jsx)(z,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/cron`,label:`Scheduled`,icon:(0,G.jsx)(Fe,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/trends`,label:`Trends`,icon:(0,G.jsx)(ge,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/settings`,label:`Settings`,icon:(0,G.jsx)(_e,{className:`w-4 h-4`})})]}),(0,G.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-xs text-fg-dim`,children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1.5 py-0.5 mono text-[10px]`,children:`⌘K`}),(0,G.jsx)(`span`,{className:w(`w-2 h-2 rounded-full`,e.isSuccess?`bg-ok`:`bg-warn`)}),(0,G.jsx)(`span`,{children:e.isSuccess?`connected`:`connecting…`})]})]}),(0,G.jsx)(`main`,{className:`flex-1 overflow-hidden`,children:(0,G.jsx)(le,{})}),(0,G.jsx)(Xe,{})]})}function K({to:e,label:t,icon:n,end:r,disabled:i}){return i?(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-fg-muted cursor-not-allowed`,title:`coming in the next phase`,children:[n,t]}):(0,G.jsxs)(fe,{to:e,end:r,className:({isActive:e})=>w(`flex items-center gap-1.5 px-3 py-1.5 rounded-md transition`,e?`bg-accent/20 text-accent`:`text-fg-dim hover:bg-bg-elev hover:text-fg`),children:[n,t]})}var Qe=[`prompt`,`response`,`tool_call`,`shell_exec`,`file_write`,`file_read`,`file_change`,`session_start`,`session_end`,`compaction`],$e=[{id:`1h`,label:`1h`,ms:60*6e4},{id:`24h`,label:`24h`,ms:1440*6e4},{id:`7d`,label:`7d`,ms:10080*6e4},{id:`all`,label:`all`,ms:null}];function et(){let e=H(e=>e.events),t=H(e=>e.initialized),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(`all`),[o,s]=(0,V.useState)(`all`),[c,l]=(0,V.useState)(`24h`),u=(0,V.useRef)(null),d=m({queryKey:[`agents`],queryFn:g.agents,refetchInterval:1e4});(0,V.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.metaKey||e.ctrlKey)return;let t=e.target;t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)||(e.preventDefault(),u.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let f=(0,V.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.agent,(t.get(n.agent)??0)+1);return t},[e]),p=(0,V.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.type,(t.get(n.type)??0)+1);return t},[e]),ee=(0,V.useMemo)(()=>{let t=[[`all`,e.length]],n=d.data?.agents??[];for(let e of n)!e.present||!e.instrumented||t.push([e.name,f.get(e.name)??0]);for(let[e,n]of f)t.find(t=>t[0]===e)||t.push([e,n]);return t},[d.data,f,e.length]),te=(0,V.useMemo)(()=>[[`all`,e.length]].concat(Qe.filter(e=>p.has(e)).map(e=>[e,p.get(e)])),[e.length,p]),h=(0,V.useMemo)(()=>{let t=n.trim().toLowerCase(),r=$e.find(e=>e.id===c)?.ms??null,a=r==null?0:Date.now()-r;return e.filter(e=>i!==`all`&&e.agent!==i||o!==`all`&&e.type!==o||r!=null&&new Date(e.ts).getTime()<a?!1:t?(e.summary??``).toLowerCase().includes(t)||(e.path??``).toLowerCase().includes(t)||(e.cmd??``).toLowerCase().includes(t)||(e.tool??``).toLowerCase().includes(t)||(e.details?.fullText??``).toLowerCase().includes(t):!0)},[e,n,i,o,c]),ne=t&&e.length>0&&h.length===0&&i!==`all`;return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-5 py-3 border-b border-bg-border bg-bg-surface`,children:[(0,G.jsxs)(`div`,{className:`relative flex-1 min-w-[240px] max-w-lg`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:u,value:n,onChange:e=>r(e.target.value),placeholder:`filter the live buffer… (press / to focus)`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-1.5 text-sm outline-none focus:border-accent`})]}),(0,G.jsx)(nt,{label:`agent`,value:i,options:ee,onChange:e=>a(e)}),(0,G.jsx)(nt,{label:`type`,value:o,options:te,onChange:e=>s(e)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim`,children:`window:`}),$e.map(e=>(0,G.jsx)(`button`,{onClick:()=>l(e.id),className:w(`px-2 py-1 rounded-md transition mono`,c===e.id?`bg-accent/20 text-accent border border-accent/40`:`border border-bg-border text-fg-dim hover:bg-bg-elev`),children:e.label},e.id))]}),(0,G.jsxs)(`div`,{className:`ml-auto text-xs text-fg-dim`,children:[(0,G.jsx)(I,{className:`inline w-3.5 h-3.5 mr-1`}),h.length,` / `,e.length,` events`]})]}),ne&&(0,G.jsxs)(`div`,{className:`px-5 py-2 text-xs text-warn bg-warn/10 border-b border-warn/30`,children:[`No `,(0,G.jsx)(`span`,{className:`mono`,children:i}),` events in the live buffer. agentwatch only captures events fired `,(0,G.jsx)(`i`,{children:`after`}),` it started. To see historical `,(0,G.jsx)(`span`,{className:`mono`,children:i}),` activity, open the `,(0,G.jsx)(b,{to:`/logs`,className:`text-accent underline`,children:`Logs`}),` view (reads disk JSONLs).`]}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[!t&&(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`}),t&&e.length===0&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:`No events yet.`}),(0,G.jsxs)(`div`,{className:`text-xs`,children:[`Launch a Claude Code / Codex / Cursor / Gemini / Hermes / OpenClaw session and events will stream in real-time.`,` `,(0,G.jsx)(b,{to:`/logs`,className:`text-accent underline`,children:`Or open /logs to search historical JSONLs.`})]})]}),t&&e.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border z-10`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 w-36`,children:`date / time`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-28`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-32`,children:`type`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-10`,children:`risk`}),(0,G.jsx)(`th`,{className:`px-3 py-2`,children:`event`})]})}),(0,G.jsx)(`tbody`,{children:h.slice(0,500).map(e=>(0,G.jsx)(tt,{event:e},e.id))})]})]})]})}function tt({event:e}){let t=e.summary??e.cmd??e.path??e.tool??`—`;return(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/40 row-hover`,children:[(0,G.jsx)(`td`,{className:`px-4 py-1.5 text-fg-dim mono text-xs align-top whitespace-nowrap`,children:Se(e.ts)}),(0,G.jsx)(`td`,{className:w(`px-2 py-1.5 mono text-xs align-top`,j(e.agent)),children:e.agent}),(0,G.jsxs)(`td`,{className:`px-2 py-1.5 mono text-xs align-top`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mr-1`,children:E(e.type)}),e.type]}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 align-top`,children:(0,G.jsx)(`span`,{className:w(`inline-block text-[10px] mono px-1.5 py-0.5 rounded`,A(e.riskScore)),children:e.riskScore})}),(0,G.jsxs)(`td`,{className:`px-3 py-1.5 align-top`,children:[(0,G.jsx)(b,{to:`/events/${encodeURIComponent(e.id)}`,className:`hover:text-accent`,children:(0,G.jsx)(`span`,{className:`mono text-xs truncate inline-block max-w-3xl`,children:t})}),e.sessionId&&(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e.sessionId)}`,className:`ml-3 text-[10px] text-fg-muted hover:text-accent mono`,title:e.sessionId,children:[`session:`,e.sessionId.slice(0,10)]})]})]})}function nt({label:e,value:t,options:n,onChange:r}){return(0,G.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-fg-dim`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`select`,{value:t,onChange:e=>r(e.target.value),className:`bg-bg-elev border border-bg-border rounded-md px-2 py-1 outline-none focus:border-accent`,children:n.map(([e,t])=>(0,G.jsxs)(`option`,{value:e,children:[e,` (`,t,`)`]},e))})]})}function rt(){let e=m({queryKey:[`projects`],queryFn:g.projects,refetchInterval:5e3});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(e.error)return(0,G.jsxs)(`div`,{className:`p-6 text-danger`,children:[`failed: `,String(e.error)]});let t=e.data?.projects??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`Projects`}),(0,G.jsx)(`span`,{className:`text-sm text-fg-dim`,children:t.length})]}),t.length===0?(0,G.jsx)(`div`,{className:`p-10 text-center text-fg-dim`,children:`No projects detected yet — once an agent writes to a project, it'll appear here.`}):(0,G.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 p-5`,children:t.map(e=>(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e.name)}`,className:`block border border-bg-border rounded-lg p-4 bg-bg-surface hover:bg-bg-elev hover:border-accent/40 transition`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,G.jsx)(F,{className:`w-4 h-4 text-accent shrink-0`}),(0,G.jsx)(`div`,{className:`font-medium truncate`,children:e.name})]}),(0,G.jsx)(Ae,{className:`w-4 h-4 text-fg-muted`})]}),(0,G.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-2 text-xs`,children:[(0,G.jsx)(q,{label:`events`,value:String(e.eventCount)}),(0,G.jsx)(q,{label:`sessions`,value:String(e.sessionIds.length)}),(0,G.jsx)(q,{label:`cost`,value:k(e.cost)})]}),e.lastTs&&(0,G.jsxs)(`div`,{className:`mt-2 text-[11px] text-fg-muted mono`,children:[`last: `,O(e.lastTs)]})]},e.name))})]})}function q({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`bg-bg-elev rounded-md px-2 py-1.5`,children:[(0,G.jsx)(`div`,{className:`text-[10px] uppercase text-fg-muted`,children:e}),(0,G.jsx)(`div`,{className:`mono`,children:t})]})}function it(){let{name:e=``}=y(),t=m({queryKey:[`project-sessions`,e],queryFn:()=>g.projectSessions(e),refetchInterval:5e3}).data?.sessions??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:`/projects`,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:decodeURIComponent(e)}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[t.length,` sessions`]}),(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e)}/activity`,className:`ml-auto text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Me,{className:`w-3.5 h-3.5`}),` activity`]}),(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e)}/yield`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ve,{className:`w-3.5 h-3.5`}),` yield`]})]}),(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-5 py-2 w-32`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2`,children:`session`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-20`,children:`events`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-24`,children:`cost`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`first`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`last`})]})}),(0,G.jsx)(`tbody`,{children:t.map(e=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/40 row-hover`,children:[(0,G.jsx)(`td`,{className:w(`px-5 py-1.5 mono text-xs`,j(e.agent)),children:e.agent}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(e.sessionId)}`,className:`hover:text-accent`,children:e.sessionId})}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:e.eventCount}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:k(e.cost)}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs text-fg-dim`,children:e.firstTs?O(e.firstTs):`—`}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs text-fg-dim`,children:e.lastTs?O(e.lastTs):`—`})]},e.sessionId))})]})]})}function at(){let{id:e=``}=y(),t=m({queryKey:[`session`,e],queryFn:()=>g.session(e),refetchInterval:2e3});if(t.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(t.error)return(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(t.error)});let n=t.data?.events??[],r=n;return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:-1,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsxs)(`h1`,{className:`text-lg font-bold mono`,children:[`session:`,e.slice(0,16)]}),(0,G.jsx)(`span`,{className:w(`text-sm`,j(t.data?.agent)),children:t.data?.agent}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[n.length,` events`]}),(0,G.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/tokens`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ge,{className:`w-3.5 h-3.5`}),` tokens`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/compaction`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(N,{className:`w-3.5 h-3.5`}),` compaction`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/graph`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Ie,{className:`w-3.5 h-3.5`}),` graph`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/diffs`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(be,{className:`w-3.5 h-3.5`}),` diffs`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/replay`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(xe,{className:`w-3.5 h-3.5`}),` replay`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/activity`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Me,{className:`w-3.5 h-3.5`}),` activity`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/yield`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ve,{className:`w-3.5 h-3.5`}),` yield`]}),(0,G.jsxs)(`a`,{href:`/api/sessions/${encodeURIComponent(e)}/export?format=md&inline=1`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(P,{className:`w-3.5 h-3.5`}),` .md`]}),(0,G.jsxs)(`a`,{href:`/api/sessions/${encodeURIComponent(e)}/export?format=json&inline=1`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(P,{className:`w-3.5 h-3.5`}),` .json`]})]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-auto`,children:r.map(e=>(0,G.jsx)(ot,{event:e},e.id))})]})}function ot({event:e}){let t=e.details?.fullText??e.details?.toolResult??e.details?.thinking;return(0,G.jsxs)(`div`,{className:`px-5 py-2 border-b border-bg-border/30 hover:bg-bg-surface/40`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mono`,children:D(e.ts)}),(0,G.jsx)(`span`,{className:w(`mono`,j(e.agent)),children:e.agent}),(0,G.jsxs)(`span`,{className:`mono text-fg-dim`,children:[E(e.type),` `,e.type]}),(0,G.jsx)(`span`,{className:w(`text-[10px] mono px-1.5 rounded`,A(e.riskScore)),children:e.riskScore}),(0,G.jsx)(b,{to:`/events/${encodeURIComponent(e.id)}`,className:`ml-auto text-fg-muted hover:text-accent text-[11px]`,children:`detail →`})]}),e.summary&&(0,G.jsx)(`div`,{className:`mt-1 text-sm mono whitespace-pre-wrap`,children:e.summary}),t&&(0,G.jsxs)(`pre`,{className:`mt-1 text-xs mono text-fg-dim bg-bg-surface rounded p-2 overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap`,children:[t.slice(0,2e3),t.length>2e3&&`… (${t.length-2e3} more chars)`]})]})}function st(){let{id:e=``}=y(),t=m({queryKey:[`event`,e],queryFn:()=>g.event(e)});if(t.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(t.error)return(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(t.error)});let n=t.data?.event;return n?(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:-1,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`event`}),(0,G.jsx)(`span`,{className:`text-sm text-fg-dim mono`,children:n.id})]}),(0,G.jsxs)(`div`,{className:`p-5 space-y-4 max-w-5xl`,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3`,children:[(0,G.jsx)(J,{label:`time`,value:O(n.ts)}),(0,G.jsx)(J,{label:`agent`,value:(0,G.jsx)(`span`,{className:j(n.agent),children:n.agent})}),(0,G.jsx)(J,{label:`type`,value:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{className:`text-fg-muted`,children:[E(n.type),` `]}),n.type]})}),(0,G.jsx)(J,{label:`risk`,value:(0,G.jsx)(`span`,{className:w(`mono px-1.5 rounded`,A(n.riskScore)),children:n.riskScore})}),n.sessionId&&(0,G.jsx)(J,{label:`session`,value:(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(n.sessionId)}`,className:`hover:text-accent mono text-xs`,children:n.sessionId.slice(0,20)})}),n.tool&&(0,G.jsx)(J,{label:`tool`,value:n.tool}),n.path&&(0,G.jsx)(J,{label:`path`,value:(0,G.jsx)(`span`,{className:`mono text-xs`,children:n.path})})]}),n.summary&&(0,G.jsx)(Y,{label:`summary`,children:(0,G.jsx)(`div`,{className:`whitespace-pre-wrap mono text-sm`,children:n.summary})}),n.cmd&&(0,G.jsx)(Y,{label:`cmd`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.cmd})}),n.details?.fullText&&(0,G.jsx)(Y,{label:`full text`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.details.fullText})}),n.details?.thinking&&(0,G.jsx)(Y,{label:`thinking`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap text-fg-dim`,children:n.details.thinking})}),n.details?.toolInput&&(0,G.jsx)(Y,{label:`tool input`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:JSON.stringify(n.details.toolInput,null,2)})}),n.details?.toolResult&&(0,G.jsx)(Y,{label:w(`tool result`,n.details.toolError&&`(error)`),children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.details.toolResult})}),n.details?.usage&&(0,G.jsx)(Y,{label:`usage`,children:(0,G.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 text-sm`,children:[(0,G.jsx)(J,{label:`input`,value:T(n.details.usage.input)}),(0,G.jsx)(J,{label:`output`,value:T(n.details.usage.output)}),(0,G.jsx)(J,{label:`cache read`,value:T(n.details.usage.cacheRead)}),(0,G.jsx)(J,{label:`cache create`,value:T(n.details.usage.cacheCreate)}),n.details.cost!=null&&(0,G.jsx)(J,{label:`cost`,value:k(n.details.cost)}),n.details.model&&(0,G.jsx)(J,{label:`model`,value:(0,G.jsx)(`span`,{className:`mono text-xs`,children:n.details.model})})]})}),n.details?.source&&(0,G.jsxs)(`div`,{className:`text-xs text-fg-muted mono`,children:[`source: `,n.details.source]})]})]}):(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:`event not found`})}function J({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-md px-3 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] uppercase text-fg-muted`,children:e}),(0,G.jsx)(`div`,{className:`mt-0.5`,children:t})]})}function Y({label:e,children:t}){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-xs uppercase text-fg-muted mb-1`,children:e}),(0,G.jsx)(`div`,{className:`bg-bg-surface border border-bg-border rounded-md p-3 overflow-x-auto`,children:t})]})}function ct(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`live`),i=(0,V.useRef)(null);(0,V.useEffect)(()=>{i.current?.focus()},[]);let a=S({mutationFn:({q:e,m:t})=>g.search(e,t,100)});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let r=e.trim();r&&a.mutate({q:r,m:n})},className:`px-5 py-4 border-b border-bg-border bg-bg-surface flex items-center gap-3`,children:[(0,G.jsxs)(`div`,{className:`relative flex-1`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:i,value:e,onChange:e=>t(e.target.value),placeholder:`search — enter to run`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-2 outline-none focus:border-accent`})]}),(0,G.jsx)(`div`,{className:`flex rounded-md overflow-hidden border border-bg-border`,children:[`live`,`cross`,`semantic`].map(e=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:w(`px-3 py-2 text-xs transition`,n===e?`bg-accent/20 text-accent`:`bg-bg-elev text-fg-dim hover:bg-bg`),children:e},e))}),(0,G.jsx)(`button`,{type:`submit`,disabled:!e.trim()||a.isPending,className:`px-4 py-2 bg-accent/20 text-accent rounded-md text-xs hover:bg-accent/30 disabled:opacity-40`,children:a.isPending?`searching…`:`search`})]}),(0,G.jsx)(lt,{mode:n}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[a.data?.status&&(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-warn bg-warn/10 border-b border-warn/30`,children:a.data.status}),a.data?.error&&(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-danger bg-danger/10 border-b border-danger/30`,children:a.data.error}),a.data&&a.data.hits.length===0&&!a.isPending&&(0,G.jsx)(`div`,{className:`p-10 text-center text-fg-dim`,children:`no matches.`}),a.data&&a.data.hits.length>0&&(0,G.jsx)(ut,{hits:a.data.hits,mode:a.data.mode}),!a.data&&!a.isPending&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-1`,children:`Three modes:`}),(0,G.jsxs)(`ul`,{className:`text-xs space-y-1 inline-block text-left`,children:[(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`live`}),` — substring across the current in-memory buffer (fast, recent only)`]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`cross`}),` — ripgrep across every JSONL on disk (slow first time, thorough)`]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`semantic`}),` — hybrid BM25 + embedding search (fuzzy, needs the index built in the TUI first)`]})]})]})]})]})}function lt({mode:e}){return(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-fg-muted bg-bg-surface border-b border-bg-border/50`,children:{live:`searching the in-memory ring buffer (500–2000 events).`,cross:`searching every session JSONL on disk.`,semantic:`searching the hybrid BM25 + embedding index.`}[e]})}function ut({hits:e}){return(0,G.jsx)(`div`,{children:e.map((e,t)=>{if(e.kind===`live`){let n=e.event;return(0,G.jsxs)(b,{to:`/events/${encodeURIComponent(n.id)}`,className:`block px-5 py-2 border-b border-bg-border/40 row-hover`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mono`,children:D(n.ts)}),(0,G.jsx)(`span`,{className:w(`mono`,j(n.agent)),children:n.agent}),(0,G.jsxs)(`span`,{className:`mono text-fg-dim`,children:[E(n.type),` `,n.type]})]}),(0,G.jsx)(`div`,{className:`mt-0.5 mono text-sm truncate`,children:n.summary??n.cmd??n.path??n.tool??``})]},t)}let n=e.hit;return(0,G.jsxs)(b,{to:n.sessionId?`/sessions/${encodeURIComponent(n.sessionId)}`:`#`,className:`block px-5 py-2 border-b border-bg-border/40 row-hover`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:w(`mono`,j(n.agent??`unknown`)),children:n.agent??`—`}),(0,G.jsx)(`span`,{className:`mono text-fg-dim`,children:n.sessionId?.slice(0,20)}),n.score!=null&&(0,G.jsxs)(`span`,{className:`text-fg-muted mono text-[10px]`,children:[`score `,n.score.toFixed(3)]})]}),(0,G.jsx)(`div`,{className:`mt-0.5 mono text-sm whitespace-pre-wrap line-clamp-3 text-fg-dim`,children:n.snippet??``})]},t)})})}function dt(){let e=m({queryKey:[`agents`],queryFn:g.agents,refetchInterval:1e4}).data?.agents??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(B,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`agents`}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[e.filter(e=>e.present).length,` installed`]})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 p-5`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.present?e.instrumented?(0,G.jsx)(Ne,{className:`w-4 h-4 text-ok`}):(0,G.jsx)(ye,{className:`w-4 h-4 text-warn`}):(0,G.jsx)(Pe,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`div`,{className:w(`font-bold`,j(e.name)),children:e.label})]}),(0,G.jsx)(`div`,{className:`mt-2 text-xs text-fg-dim mono`,children:e.present?e.instrumented?`installed · events captured`:`detected · events TBD`:`not detected`}),e.configPath&&(0,G.jsx)(`div`,{className:`mt-1 text-[11px] text-fg-muted mono break-all`,children:e.configPath}),(0,G.jsxs)(`div`,{className:`mt-3 flex items-center gap-4 text-xs`,children:[(0,G.jsxs)(`span`,{className:`text-fg-dim`,children:[`events: `,(0,G.jsx)(`span`,{className:`mono`,children:e.eventCount})]}),e.lastEventAt&&(0,G.jsxs)(`span`,{className:`text-fg-dim`,children:[`last: `,(0,G.jsx)(`span`,{className:`mono`,children:O(e.lastEventAt)})]})]})]},e.name))})]})}function ft(){let e=m({queryKey:[`permissions`],queryFn:g.permissions});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});let t=e.data??{};return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(z,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`permissions`})]}),(0,G.jsxs)(`div`,{className:`p-5 space-y-5 max-w-5xl`,children:[(0,G.jsx)(X,{label:`Claude Code`,perms:t.claude}),(0,G.jsx)(X,{label:`Codex`,perms:t.codex}),(0,G.jsx)(X,{label:`Gemini`,perms:t.gemini}),(0,G.jsx)(X,{label:`OpenClaw`,perms:t.openclaw})]})]})}function X({label:e,perms:t}){return t?(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(ze,{className:`w-4 h-4 text-ok`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:e})]}),(0,G.jsx)(`pre`,{className:`mono text-xs text-fg-dim overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(t,null,2)})]}):(0,G.jsx)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,G.jsx)(Re,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:e}),(0,G.jsx)(`span`,{className:`text-xs text-fg-muted`,children:`not installed / no config`})]})})}function pt(){let e=m({queryKey:[`cron`],queryFn:g.cron,refetchInterval:1e4});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});let t=e.data?.jobs??[],n=e.data?.heartbeats??[],r=e.data?.scheduledEvents??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(Fe,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`scheduled`})]}),(0,G.jsxs)(`section`,{className:`p-5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(je,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:`cron jobs`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:t.length})]}),t.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No OpenClaw cron jobs installed.`}),t.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`text-left text-xs uppercase text-fg-muted`,children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`name`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`schedule`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`agent`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`channel`}),(0,G.jsx)(`th`,{className:`py-1`,children:`last run`})]})}),(0,G.jsx)(`tbody`,{children:t.map(e=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 mono text-xs`,children:[(0,G.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.name??e.id}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.cron??e.schedule??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.agentId??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.channel??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 text-fg-dim`,children:e.lastRunAt?O(e.lastRunAt):`never`})]},e.id))})]})]}),(0,G.jsxs)(`section`,{className:`p-5 border-t border-bg-border`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(Le,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:`heartbeats`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:n.length})]}),n.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No heartbeat tasks detected.`}),n.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`text-left text-xs uppercase text-fg-muted`,children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`task`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`agent`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`last`}),(0,G.jsx)(`th`,{className:`py-1`,children:`file`})]})}),(0,G.jsx)(`tbody`,{children:n.map((e,t)=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 mono text-xs`,children:[(0,G.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.taskName??e.name??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.agentId??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.lastHeartbeatAt?O(e.lastHeartbeatAt):`—`}),(0,G.jsx)(`td`,{className:`py-1.5 text-fg-dim truncate max-w-md`,children:e.filePath??e.file??``})]},t))})]})]}),(0,G.jsxs)(`section`,{className:`p-5 border-t border-bg-border`,children:[(0,G.jsxs)(`h2`,{className:`font-bold mb-3`,children:[`recent scheduled events `,(0,G.jsx)(`span`,{className:`text-xs font-normal text-fg-dim`,children:r.length})]}),r.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No scheduled events in the live buffer.`}),r.slice(0,50).map(e=>(0,G.jsxs)(`div`,{className:`mono text-xs py-1 border-b border-bg-border/20`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim mr-2`,children:O(e.ts)}),(0,G.jsx)(`span`,{className:`text-accent mr-2`,children:e.agent}),(0,G.jsx)(`span`,{className:`mr-2`,children:e.type}),(0,G.jsx)(`span`,{className:`text-fg-dim`,children:e.summary})]},e.id))]})]})}var Z=[{id:`1h`,label:`1h`,hours:1},{id:`24h`,label:`24h`,hours:24},{id:`7d`,label:`7d`,hours:168},{id:`30d`,label:`30d`,hours:720},{id:`all`,label:`all`,hours:null}],mt=[`claude-code`,`codex`,`gemini`];function ht(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`7d`),[i,a]=(0,V.useState)(new Set),[o,s]=(0,V.useState)(100),c=(0,V.useRef)(null);(0,V.useEffect)(()=>{c.current?.focus()},[]);let l=m({queryKey:[`agents`],queryFn:g.agents});(0,V.useMemo)(()=>new Set(mt),[]);let u=S({mutationFn:({q:e,since:t,agents:n,limit:r})=>g.search(e,`cross`,r,{since:t,agents:n})});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`form`,{onSubmit:t=>{t?.preventDefault();let r=e.trim();if(!r)return;let a=Z.find(e=>e.id===n)?.hours??null,s=a==null?void 0:new Date(Date.now()-a*36e5).toISOString(),c=i.size>0?Array.from(i):void 0;u.mutate({q:r,since:s,agents:c,limit:o})},className:`flex flex-wrap items-center gap-3 px-5 py-3 border-b border-bg-border bg-bg-surface`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(L,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h1`,{className:`font-bold`,children:`Logs`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:`disk-backed history search`})]}),(0,G.jsxs)(`div`,{className:`relative flex-1 min-w-[240px] max-w-xl`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:c,value:e,onChange:e=>t(e.target.value),placeholder:`search every session file on disk — press enter`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-1.5 text-sm outline-none focus:border-accent`})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim`,children:`when:`}),Z.map(e=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),className:w(`px-2 py-1 rounded-md transition mono`,n===e.id?`bg-accent/20 text-accent border border-accent/40`:`border border-bg-border text-fg-dim hover:bg-bg-elev`),children:e.label},e.id))]}),(0,G.jsx)(`button`,{type:`submit`,disabled:!e.trim()||u.isPending,className:`px-4 py-1.5 rounded-md bg-accent/20 text-accent text-xs hover:bg-accent/30 disabled:opacity-40`,children:u.isPending?`searching…`:`search`})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-5 py-2 border-b border-bg-border/50 text-xs bg-bg/40`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted`,children:`agents:`}),mt.map(e=>{let t=i.has(e),n=l.data?.agents.find(t=>t.name===e&&t.present);return(0,G.jsx)(`button`,{onClick:()=>{let n=new Set(i);t?n.delete(e):n.add(e),a(n)},className:w(`px-2 py-0.5 rounded-md border transition mono`,t?`border-accent/40 bg-accent/20 ${j(e)}`:`border-bg-border text-fg-dim hover:bg-bg-elev ${n?``:`opacity-50`}`),title:n?`${e} (installed)`:`${e} — not detected on disk`,children:e},e)}),(0,G.jsx)(`span`,{className:`text-fg-muted ml-3`,children:`results cap:`}),(0,G.jsx)(`select`,{value:o,onChange:e=>s(Number(e.target.value)),className:`bg-bg-elev border border-bg-border rounded-md px-2 py-0.5 mono`,children:[50,100,200,500].map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))}),l.data?.agents.some(e=>e.name===`openclaw`&&e.present)&&(0,G.jsx)(`span`,{className:`ml-auto text-warn/80`,children:`OpenClaw + Hermes not scanned yet (SQLite storage — adapter TBD).`})]}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[u.isPending&&(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`searching disk…`}),u.isError&&(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(u.error.message)}),u.data&&u.data.hits.length===0&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsxs)(`div`,{children:[`No matches on disk for “`,e.trim(),`”.`]}),(0,G.jsx)(`div`,{className:`text-xs mt-2`,children:`Try a wider time window, drop agent filters, or switch query to something broader.`})]}),u.data&&u.data.hits.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`px-5 py-2 text-xs text-fg-dim bg-bg-surface border-b border-bg-border`,children:[(0,G.jsx)(I,{className:`inline w-3.5 h-3.5 mr-1`}),u.data.hits.length,` hits`,u.data.totalScanned!=null&&u.data.totalScanned!==u.data.hits.length&&(0,G.jsxs)(`span`,{children:[` · `,u.data.totalScanned,` scanned before filters`]}),(0,G.jsxs)(`span`,{children:[` · window: `,Z.find(e=>e.id===n)?.label]}),i.size>0&&(0,G.jsxs)(`span`,{children:[` · agents: `,Array.from(i).join(`, `)]})]}),(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border z-10`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 w-36`,children:`date / time`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-28`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`session`}),(0,G.jsx)(`th`,{className:`px-3 py-2`,children:`match`})]})}),(0,G.jsx)(`tbody`,{children:u.data.hits.map((e,t)=>{let n=e.hit??e,r=n.ts;return(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 row-hover`,children:[(0,G.jsx)(`td`,{className:`px-4 py-1.5 text-fg-dim mono text-xs align-top whitespace-nowrap`,children:r?Se(r):`—`}),(0,G.jsx)(`td`,{className:w(`px-2 py-1.5 mono text-xs align-top`,j(n.agent)),children:n.agent}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs align-top`,children:n.sessionId?(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(n.sessionId)}`,className:`hover:text-accent`,title:n.sessionId,children:n.sessionId.slice(0,16)}):(0,G.jsx)(`span`,{className:`text-fg-muted`,children:`—`})}),(0,G.jsx)(`td`,{className:`px-3 py-1.5 mono text-xs align-top whitespace-pre-wrap truncate max-w-3xl`,children:n.line})]},`${n.path}:${n.lineNumber}:${t}`)})})]})]}),!u.data&&!u.isPending&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:`Type a query + enter.`}),(0,G.jsx)(`div`,{className:`text-xs`,children:"This scans the session JSONLs on disk (`~/.claude/projects/`, `~/.codex/sessions/`, `~/.gemini/tmp/`). Unlike the Timeline page, results go all the way back, not just since agentwatch booted."})]})]})]})}var gt=`modulepreload`,_t=function(e){return`/`+e},vt={},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=_t(t,n),t in vt)return;vt[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:gt,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},yt=(0,V.lazy)(()=>Q(()=>import(`./SessionTokens-BjuXcVM2.js`).then(e=>({default:e.SessionTokensPage})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),bt=(0,V.lazy)(()=>Q(()=>import(`./SessionCompaction-Dx3tbM9N.js`).then(e=>({default:e.SessionCompactionPage})),__vite__mapDeps([11,1,2,3,4,5,6,12,13,7,14,15,10]))),xt=(0,V.lazy)(()=>Q(()=>import(`./SessionGraph-DWP1YyP0.js`).then(e=>({default:e.SessionGraphPage})),__vite__mapDeps([16,1,4,3,5,10]))),St=(0,V.lazy)(()=>Q(()=>import(`./SessionDiffs-CDUkVqua.js`).then(e=>({default:e.SessionDiffsPage})),__vite__mapDeps([17,1,4,3,5,18,10]))),Ct=(0,V.lazy)(()=>Q(()=>import(`./SessionReplay-kz1EhiaI.js`).then(e=>({default:e.SessionReplayPage})),__vite__mapDeps([19,1,4,20,3,5,21,10]))),wt=(0,V.lazy)(()=>Q(()=>import(`./SessionActivity-BUzJpWwc.js`).then(e=>({default:e.SessionActivityPage})),__vite__mapDeps([22,1,2,3,4,5,23,13,6,24,14,9,25,8,10]))),Tt=(0,V.lazy)(()=>Q(()=>import(`./ProjectActivity-BG5hEcJl.js`).then(e=>({default:e.ProjectActivityPage})),__vite__mapDeps([26,1,2,3,4,13,5,24,8,10]))),Et=(0,V.lazy)(()=>Q(()=>import(`./SessionYield-DXF-Xb5T.js`).then(e=>({default:e.SessionYieldPage})),__vite__mapDeps([27,1,4,5,10]))),Dt=(0,V.lazy)(()=>Q(()=>import(`./ProjectYield-vVxXaT6e.js`).then(e=>({default:e.ProjectYieldPage})),__vite__mapDeps([28,1,2,3,4,5,23,13,6,24,14,9,12,7,8,10]))),Ot=(0,V.lazy)(()=>Q(()=>import(`./Trends-wdNqOtnn.js`).then(e=>({default:e.TrendsPage})),__vite__mapDeps([29,1,2,3,30,23,13,6,24,14,9,12,7,25,15,8,10]))),kt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.SettingsShell})),__vite__mapDeps([31,1,4,20,3,32]))),At=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.BudgetsSettings})),__vite__mapDeps([31,1,4,20,3,32]))),jt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.AnomalySettings})),__vite__mapDeps([31,1,4,20,3,32]))),Mt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.TriggersSettings})),__vite__mapDeps([31,1,4,20,3,32]))),Nt=new ke({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:2e3}}});function $(e){return(0,G.jsx)(V.Suspense,{fallback:(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`}),children:e})}Ke.createRoot(document.getElementById(`root`)).render((0,G.jsx)(V.StrictMode,{children:(0,G.jsx)(c,{client:Nt,children:(0,G.jsx)(me,{children:(0,G.jsx)(pe,{children:(0,G.jsxs)(x,{element:(0,G.jsx)(Ze,{}),children:[(0,G.jsx)(x,{index:!0,element:(0,G.jsx)(et,{})}),(0,G.jsx)(x,{path:`projects`,element:(0,G.jsx)(rt,{})}),(0,G.jsx)(x,{path:`projects/:name`,element:(0,G.jsx)(it,{})}),(0,G.jsx)(x,{path:`sessions/:id`,element:(0,G.jsx)(at,{})}),(0,G.jsx)(x,{path:`sessions/:id/tokens`,element:$((0,G.jsx)(yt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/compaction`,element:$((0,G.jsx)(bt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/graph`,element:$((0,G.jsx)(xt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/diffs`,element:$((0,G.jsx)(St,{}))}),(0,G.jsx)(x,{path:`sessions/:id/replay`,element:$((0,G.jsx)(Ct,{}))}),(0,G.jsx)(x,{path:`sessions/:id/activity`,element:$((0,G.jsx)(wt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/yield`,element:$((0,G.jsx)(Et,{}))}),(0,G.jsx)(x,{path:`projects/:name/activity`,element:$((0,G.jsx)(Tt,{}))}),(0,G.jsx)(x,{path:`projects/:name/yield`,element:$((0,G.jsx)(Dt,{}))}),(0,G.jsx)(x,{path:`events/:id`,element:(0,G.jsx)(st,{})}),(0,G.jsx)(x,{path:`search`,element:(0,G.jsx)(ct,{})}),(0,G.jsx)(x,{path:`logs`,element:(0,G.jsx)(ht,{})}),(0,G.jsx)(x,{path:`agents`,element:(0,G.jsx)(dt,{})}),(0,G.jsx)(x,{path:`permissions`,element:(0,G.jsx)(ft,{})}),(0,G.jsx)(x,{path:`cron`,element:(0,G.jsx)(pt,{})}),(0,G.jsx)(x,{path:`trends`,element:$((0,G.jsx)(Ot,{}))}),(0,G.jsxs)(x,{path:`settings`,element:$((0,G.jsx)(kt,{})),children:[(0,G.jsx)(x,{index:!0,element:(0,G.jsx)(de,{to:`budgets`,replace:!0})}),(0,G.jsx)(x,{path:`budgets`,element:$((0,G.jsx)(At,{}))}),(0,G.jsx)(x,{path:`anomaly`,element:$((0,G.jsx)(jt,{}))}),(0,G.jsx)(x,{path:`triggers`,element:$((0,G.jsx)(Mt,{}))})]}),(0,G.jsx)(x,{path:`*`,element:(0,G.jsx)(de,{to:`/`,replace:!0})})]})})})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.left-3{left:.75rem}.top-0{top:0}.top-1\/2{top:50%}.z-10{z-index:10}.z-50{z-index:50}.m-5{margin:1.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-96{max-height:24rem}.max-h-\[60vh\]{max-height:60vh}.min-h-\[180px\]{min-height:180px}.min-h-\[300px\]{min-height:300px}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-60{width:15rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[240px\]{min-width:240px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-accent\/40{border-color:#58a6ff66}.border-bg-border{--tw-border-opacity:1;border-color:rgb(43 49 57/var(--tw-border-opacity,1))}.border-bg-border\/20{border-color:#2b313933}.border-bg-border\/30{border-color:#2b31394d}.border-bg-border\/40{border-color:#2b313966}.border-bg-border\/50{border-color:#2b313980}.border-danger\/30{border-color:#f851494d}.border-danger\/40{border-color:#f8514966}.border-warn\/30{border-color:#d299224d}.border-warn\/40{border-color:#d2992266}.bg-accent\/10{background-color:#58a6ff1a}.bg-accent\/20{background-color:#58a6ff33}.bg-bg{--tw-bg-opacity:1;background-color:rgb(11 13 16/var(--tw-bg-opacity,1))}.bg-bg-elev{--tw-bg-opacity:1;background-color:rgb(26 31 38/var(--tw-bg-opacity,1))}.bg-bg-surface{--tw-bg-opacity:1;background-color:rgb(18 21 26/var(--tw-bg-opacity,1))}.bg-bg\/30{background-color:#0b0d104d}.bg-bg\/40{background-color:#0b0d1066}.bg-black\/60{background-color:#0009}.bg-danger\/10{background-color:#f851491a}.bg-danger\/20{background-color:#f8514933}.bg-fg\/5{background-color:#e6edf30d}.bg-ok{--tw-bg-opacity:1;background-color:rgb(63 185 80/var(--tw-bg-opacity,1))}.bg-ok\/10{background-color:#3fb9501a}.bg-transparent{background-color:#0000}.bg-warn{--tw-bg-opacity:1;background-color:rgb(210 153 34/var(--tw-bg-opacity,1))}.bg-warn\/10{background-color:#d299221a}.bg-warn\/20{background-color:#d2992233}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-9{padding-left:2.25rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-\[10vh\]{padding-top:10vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.text-accent{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-danger{--tw-text-opacity:1;color:rgb(248 81 73/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-fg{--tw-text-opacity:1;color:rgb(230 237 243/var(--tw-text-opacity,1))}.text-fg-dim{--tw-text-opacity:1;color:rgb(125 133 144/var(--tw-text-opacity,1))}.text-fg-muted{--tw-text-opacity:1;color:rgb(72 79 88/var(--tw-text-opacity,1))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.text-ok{--tw-text-opacity:1;color:rgb(63 185 80/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-warn{--tw-text-opacity:1;color:rgb(210 153 34/var(--tw-text-opacity,1))}.text-warn\/80{color:#d29922cc}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.outline-none{outline-offset:2px;outline:2px solid #0000}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html,body,#root{height:100%}body{font-feature-settings:"ss01", "cv11"}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#2b3139;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#484f58}.mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.row-hover:hover{background:#12151a}.hover\:border-accent\/40:hover{border-color:#58a6ff66}.hover\:bg-accent\/30:hover{background-color:#58a6ff4d}.hover\:bg-bg:hover{--tw-bg-opacity:1;background-color:rgb(11 13 16/var(--tw-bg-opacity,1))}.hover\:bg-bg-elev:hover{--tw-bg-opacity:1;background-color:rgb(26 31 38/var(--tw-bg-opacity,1))}.hover\:bg-bg-surface\/40:hover{background-color:#12151a66}.hover\:text-accent:hover{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity,1))}.hover\:text-fg:hover{--tw-text-opacity:1;color:rgb(230 237 243/var(--tw-text-opacity,1))}.focus\:border-accent:focus{--tw-border-opacity:1;border-color:rgb(88 166 255/var(--tw-border-opacity,1))}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.focus\:ring-accent\/50:focus{--tw-ring-color:#58a6ff80}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-Bjwrp8ZV.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as e,Ln as t,X as n,Y as r}from"./CategoricalChart-DEGrE0Qv.js";var i=e=>null;i.displayName=`Cell`;var a=(e,r,i)=>{var a=t();return(t,o)=>s=>{e?.(t,o,s),a(n({activeIndex:String(o),activeDataKey:r,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}},o=n=>{var r=t();return(t,i)=>a=>{n?.(t,i,a),r(e())}},s=(e,n,i)=>{var a=t();return(t,o)=>s=>{e?.(t,o,s),a(r({activeIndex:String(o),activeDataKey:n,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}};export{i,a as n,o as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-Bjwrp8ZV.js";var t=e(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),n=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),r=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{n,t as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,P as t,S as n,T as r,f as i,j as a,k as o,l as s,o as c,u as l,v as u}from"./createLucideIcon-Bjwrp8ZV.js";var d=class extends s{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||f(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=l({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),i.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function f(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var p=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&u(t.mutationKey)!==u(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){i.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},m=t(a(),1);function h(t,r){let a=c(r),[o]=m.useState(()=>new p(a,t));m.useEffect(()=>{o.setOptions(t)},[o,t]);let s=m.useSyncExternalStore(m.useCallback(e=>o.subscribe(i.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=m.useCallback((e,t)=>{o.mutate(e,t).catch(n)},[o]);if(s.error&&e(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}export{d as n,h as t};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iIzU4YTZmZiI+PHBhdGggZD0iTTE2IDRMNCAyNGwxMiAwIDEyLTB6Ii8+PC9zdmc+" />
|
|
7
|
+
<title>agentwatch</title>
|
|
8
|
+
<style>
|
|
9
|
+
html, body, #root { height: 100%; margin: 0; }
|
|
10
|
+
body { background: #0b0d10; color: #e6edf3; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
|
|
11
|
+
</style>
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-CJArQihV.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-Bjwrp8ZV.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-BYqqB4pa.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/useMutation-CfQYV-vU.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/clsx-DnEFlO87.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/arrow-left-B-iQ08P0.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/chart-column-BwF4X7mz.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/triangle-alert-BhvAiLmv.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/file-pen-CHXP3wF7.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/play-ONoP4Jfr.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/format-zsCsqELF.js">
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CTAomrBX.css">
|
|
24
|
+
</head>
|
|
25
|
+
<body>
|
|
26
|
+
<div id="root"></div>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@misha_misha/agentwatch",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "Local-only observability for every AI agent on your machine. Unified timeline across Claude Code, Codex, Gemini CLI, Cursor, OpenClaw —
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local-only observability + control plane for every AI coding agent on your machine. TUI live tail + browser dashboard on localhost. Unified timeline across Claude Code, Codex, Gemini CLI, Cursor, Hermes, OpenClaw — token + cost accounting, compaction + anomaly detection, SVG call graphs, diff attribution, agent-aware replay, MCP server mode, OpenTelemetry exporter. No cloud, no telemetry, no sign-in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Misha Nefedov",
|
|
7
7
|
"repository": {
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
"LICENSE"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "
|
|
25
|
+
"build": "npm run build:server && npm run build:web",
|
|
26
|
+
"build:server": "tsup",
|
|
27
|
+
"build:web": "cd web && vite build",
|
|
26
28
|
"dev": "tsx src/index.tsx",
|
|
29
|
+
"dev:web": "cd web && vite",
|
|
27
30
|
"start": "node bin/agentwatch.js",
|
|
28
31
|
"typecheck": "tsc --noEmit",
|
|
29
32
|
"test": "vitest run",
|
|
@@ -44,6 +47,7 @@
|
|
|
44
47
|
],
|
|
45
48
|
"license": "MIT",
|
|
46
49
|
"dependencies": {
|
|
50
|
+
"@fastify/static": "^9.1.1",
|
|
47
51
|
"@huggingface/transformers": "^4.1.0",
|
|
48
52
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
53
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -54,19 +58,38 @@
|
|
|
54
58
|
"better-sqlite3": "^12.9.0",
|
|
55
59
|
"chokidar": "^4.0.3",
|
|
56
60
|
"cli-highlight": "^2.1.11",
|
|
61
|
+
"fastify": "^5.8.5",
|
|
57
62
|
"gpt-tokenizer": "^3.4.0",
|
|
58
63
|
"ink": "^5.1.0",
|
|
59
64
|
"react": "^18.3.1",
|
|
60
65
|
"zod": "^4.3.6"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
68
|
+
"@tanstack/react-query": "^5.99.0",
|
|
69
|
+
"@tanstack/react-router": "^1.168.22",
|
|
63
70
|
"@types/better-sqlite3": "^7.6.13",
|
|
71
|
+
"@types/d3-hierarchy": "^3.1.7",
|
|
64
72
|
"@types/node": "^22.10.2",
|
|
65
73
|
"@types/react": "^18.3.18",
|
|
74
|
+
"@types/react-dom": "^18.3.7",
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
76
|
+
"autoprefixer": "^10.5.0",
|
|
77
|
+
"clsx": "^2.1.1",
|
|
78
|
+
"d3-hierarchy": "^3.1.2",
|
|
79
|
+
"lucide-react": "^1.8.0",
|
|
80
|
+
"postcss": "^8.5.10",
|
|
81
|
+
"react-diff-viewer-continued": "^4.2.0",
|
|
82
|
+
"react-dom": "^18.3.1",
|
|
83
|
+
"react-is": "^19.2.5",
|
|
84
|
+
"react-router-dom": "^6.30.3",
|
|
85
|
+
"recharts": "^3.8.1",
|
|
86
|
+
"tailwindcss": "^3.4.19",
|
|
66
87
|
"tsup": "^8.3.5",
|
|
67
88
|
"tsx": "^4.19.2",
|
|
68
89
|
"typescript": "^5.7.2",
|
|
69
|
-
"
|
|
90
|
+
"vite": "^8.0.8",
|
|
91
|
+
"vitest": "^2.1.8",
|
|
92
|
+
"zustand": "^5.0.12"
|
|
70
93
|
},
|
|
71
94
|
"engines": {
|
|
72
95
|
"node": ">=20"
|