signetai 0.116.4 → 0.116.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dashboard/_app/immutable/chunks/{CKDglwum.js → 0w1XD0lb.js} +1 -1
  2. package/dashboard/_app/immutable/chunks/{Cy-z7zd0.js → 7o0u1bS9.js} +1 -1
  3. package/dashboard/_app/immutable/chunks/{DhnS_iMI.js → AJljiOfd.js} +1 -1
  4. package/dashboard/_app/immutable/chunks/{dQqZq8Fd.js → B4-vg0a-.js} +1 -1
  5. package/dashboard/_app/immutable/chunks/{CbgpCpH5.js → B96mSUAX.js} +1 -1
  6. package/dashboard/_app/immutable/chunks/{1amP6XXU.js → BJ51dTnX.js} +1 -1
  7. package/dashboard/_app/immutable/chunks/{k89FZnVu.js → BLuLVdZ2.js} +1 -1
  8. package/dashboard/_app/immutable/chunks/{CRxWEr7f.js → BN2jzpa1.js} +1 -1
  9. package/dashboard/_app/immutable/chunks/{BlOKf96F.js → BUVR-lvQ.js} +1 -1
  10. package/dashboard/_app/immutable/chunks/{B-QUE7m6.js → BVFxlzHT.js} +1 -1
  11. package/dashboard/_app/immutable/chunks/{DORyES4k.js → BX22QKvy.js} +1 -1
  12. package/dashboard/_app/immutable/chunks/{CMBDCtSI.js → BY5OMp7x.js} +1 -1
  13. package/dashboard/_app/immutable/chunks/{NTDsvrQG.js → Bq43VInT.js} +2 -2
  14. package/dashboard/_app/immutable/chunks/{DVt5q-P0.js → C2QuwyOI.js} +1 -1
  15. package/dashboard/_app/immutable/chunks/{DqhrwgQQ.js → CO-mFeO5.js} +1 -1
  16. package/dashboard/_app/immutable/chunks/{BSUgwLpg.js → CWLZcltd.js} +1 -1
  17. package/dashboard/_app/immutable/chunks/{DJFrNm6u.js → CWcUiptV.js} +1 -1
  18. package/dashboard/_app/immutable/chunks/{tSlZITn-.js → CaLWHKTg.js} +1 -1
  19. package/dashboard/_app/immutable/chunks/{BEhGwtVW.js → ChXj2t5G.js} +2 -2
  20. package/dashboard/_app/immutable/chunks/{DcVaMhj6.js → CoY1Tb6x.js} +1 -1
  21. package/dashboard/_app/immutable/chunks/{DrlSAlyP.js → CvrtoGKE.js} +1 -1
  22. package/dashboard/_app/immutable/chunks/{a5Wh8bOq.js → CwkmEP-C.js} +1 -1
  23. package/dashboard/_app/immutable/chunks/{BV3Ogq4h.js → D3rFj77q.js} +1 -1
  24. package/dashboard/_app/immutable/chunks/{GgMbVxEE.js → D6QLKZ1G.js} +1 -1
  25. package/dashboard/_app/immutable/chunks/{WSFqqbf_.js → D7U6-q2s.js} +1 -1
  26. package/dashboard/_app/immutable/chunks/{BjK4no6W.js → DEEFx0OY.js} +1 -1
  27. package/dashboard/_app/immutable/chunks/{Dz4yfpBd.js → DF83R3ej.js} +1 -1
  28. package/dashboard/_app/immutable/chunks/{CtDFYHZq.js → DHWUsgwW.js} +3 -3
  29. package/dashboard/_app/immutable/chunks/{C2tFYJ_n.js → DO2g3iCX.js} +1 -1
  30. package/dashboard/_app/immutable/chunks/{DMmQM7Mt.js → DOvqkUPQ.js} +1 -1
  31. package/dashboard/_app/immutable/chunks/{CxQuuqtN.js → DU2afJ_a.js} +1 -1
  32. package/dashboard/_app/immutable/chunks/{Jun1srAs.js → DV2WtNIO.js} +1 -1
  33. package/dashboard/_app/immutable/chunks/{Bey3X0ZB.js → DVdY1jkS.js} +1 -1
  34. package/dashboard/_app/immutable/chunks/{D_v3nuAo.js → DYcGeLXF.js} +1 -1
  35. package/dashboard/_app/immutable/chunks/{BinOXHKI.js → DokASMwv.js} +1 -1
  36. package/dashboard/_app/immutable/chunks/{Ed-8tHx7.js → DrGzt6rb.js} +1 -1
  37. package/dashboard/_app/immutable/chunks/{Bxx9Kqrn.js → DrUAAYm5.js} +1 -1
  38. package/dashboard/_app/immutable/chunks/{Uek6V3oU.js → FSwVXA_-.js} +1 -1
  39. package/dashboard/_app/immutable/chunks/{DCJghTq1.js → NOYdzn4s.js} +1 -1
  40. package/dashboard/_app/immutable/chunks/{Bw9k4fkE.js → Wq1jHnDx.js} +3 -3
  41. package/dashboard/_app/immutable/chunks/{5qAkqee4.js → YDcHoHgY.js} +1 -1
  42. package/dashboard/_app/immutable/chunks/{DoWs5OiX.js → fw0WwVa3.js} +1 -1
  43. package/dashboard/_app/immutable/chunks/{BNOR5MAR.js → jPL9lwsW.js} +1 -1
  44. package/dashboard/_app/immutable/chunks/{LP88EgsQ.js → rJgf4rMr.js} +1 -1
  45. package/dashboard/_app/immutable/chunks/{DBQvibhv.js → thTst0Ho.js} +1 -1
  46. package/dashboard/_app/immutable/chunks/{rscyligZ.js → wrMLj0eQ.js} +1 -1
  47. package/dashboard/_app/immutable/chunks/{Bb_Lgdyk.js → y8MmZMpN.js} +1 -1
  48. package/dashboard/_app/immutable/entry/{app.C1-LBt-X.js → app.Bsu59RXQ.js} +2 -2
  49. package/dashboard/_app/immutable/entry/start.FD5zhwxD.js +1 -0
  50. package/dashboard/_app/immutable/nodes/{1.CqBA9GBE.js → 1.SPnVI4J5.js} +1 -1
  51. package/dashboard/_app/immutable/nodes/2.qmokVRZ6.js +1 -0
  52. package/dashboard/_app/version.json +1 -1
  53. package/dashboard/index.html +6 -6
  54. package/package.json +1 -1
  55. package/dashboard/_app/immutable/entry/start.DH6YDcK_.js +0 -1
  56. package/dashboard/_app/immutable/nodes/2.DlEjYETs.js +0 -1
@@ -1,4 +1,4 @@
1
- import{p as wt,g as $t,c as Fe,f as M,h as T,ah as Ht,s as Jt,i as e,b as r,d as kt,r as Ot,u as V,Q as Rt,v,w as x,x as m,y as b,z as p,t as o,k as E,j as c,l as d,N as Bt,o as ve,A as Ke,m as f,G as Ut,a as Yt,n as Qt,H as Xt,$ as Zt,K as at,ai as er,aj as tr}from"./BvuHLZ8E.js";import{c as Wt,W as rr,Y as ar,Z as sr,_ as or,B as Me,$ as nr,a0 as ir,a1 as lr,a2 as dr,H as l,a3 as Ft,a4 as ft,A as qt,a5 as cr,a6 as vr,a7 as ur,n as Dt,a8 as gr,h as fr,i as pr,a9 as jt,aa as mr,C as xr}from"./CtDFYHZq.js";import{P as _r}from"./BEjeM6IF.js";import{T as hr}from"./Cz09eUOk.js";import{I as st}from"./DJFrNm6u.js";import{L as Be}from"./BjK4no6W.js";import{c as Vt,S as Gt,a as Kt,b as pt}from"./DBQvibhv.js";import{S as Lt}from"./CMBDCtSI.js";import{T as Et}from"./Cy-z7zd0.js";import{B as Te}from"./LP88EgsQ.js";import{C as br,a as yr}from"./DMmQM7Mt.js";import{a as Mt,C as Nt}from"./BSUgwLpg.js";import{C as zt}from"./Bxx9Kqrn.js";import{b as $r,P as wr,a as kr}from"./DoWs5OiX.js";function Pr(He,_){wt(_,!0);let D=$t(_,"ref",15,null),be=$t(_,"data-slot",3,"separator"),B=Ot(_,["$$slots","$$events","$$legacy","ref","class","data-slot"]);var Q=Fe(),ee=M(Q);{let ke=V(()=>Wt("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px",_.class));T(ee,()=>Ht,(se,oe)=>{oe(se,Jt({get"data-slot"(){return be()},get class(){return e(ke)}},()=>B,{get ref(){return D()},set ref(Ae){D(Ae)}}))})}r(He,Q),kt()}var Sr=f("<!> <!>",1),Ir=f("<!> <!> <!>",1),Cr=f("<!> <!>",1),Tr=f('<div class="flex flex-col gap-1"><!> <!></div>'),Ar=f('Reason for change <span class="text-[var(--sig-accent)]">*</span>',1),Dr=f('<div class="flex flex-col gap-1"><!> <!></div> <div class="grid grid-cols-2 gap-3"><div class="flex flex-col gap-1"><!> <!></div> <div class="flex flex-col gap-1"><!> <!></div></div> <!> <div class="flex flex-col gap-1"><!> <!></div> <div class="flex items-center justify-between"><!> <!></div> <div class="flex flex-col gap-1"><!> <!></div>',1),Er=f('<span class="px-1.5 py-px border border-[var(--sig-border-strong)]"> </span>'),Mr=f(`This memory is <strong>pinned</strong>. Deleting it requires
1
+ import{p as wt,g as $t,c as Fe,f as M,h as T,ah as Ht,s as Jt,i as e,b as r,d as kt,r as Ot,u as V,Q as Rt,v,w as x,x as m,y as b,z as p,t as o,k as E,j as c,l as d,N as Bt,o as ve,A as Ke,m as f,G as Ut,a as Yt,n as Qt,H as Xt,$ as Zt,K as at,ai as er,aj as tr}from"./BvuHLZ8E.js";import{c as Wt,W as rr,Y as ar,Z as sr,_ as or,B as Me,$ as nr,a0 as ir,a1 as lr,a2 as dr,H as l,a3 as Ft,a4 as ft,A as qt,a5 as cr,a6 as vr,a7 as ur,n as Dt,a8 as gr,h as fr,i as pr,a9 as jt,aa as mr,C as xr}from"./DHWUsgwW.js";import{P as _r}from"./BEjeM6IF.js";import{T as hr}from"./Cz09eUOk.js";import{I as st}from"./CWcUiptV.js";import{L as Be}from"./DEEFx0OY.js";import{c as Vt,S as Gt,a as Kt,b as pt}from"./thTst0Ho.js";import{S as Lt}from"./BY5OMp7x.js";import{T as Et}from"./7o0u1bS9.js";import{B as Te}from"./rJgf4rMr.js";import{C as br,a as yr}from"./DOvqkUPQ.js";import{a as Mt,C as Nt}from"./CWLZcltd.js";import{C as zt}from"./DrUAAYm5.js";import{b as $r,P as wr,a as kr}from"./fw0WwVa3.js";function Pr(He,_){wt(_,!0);let D=$t(_,"ref",15,null),be=$t(_,"data-slot",3,"separator"),B=Ot(_,["$$slots","$$events","$$legacy","ref","class","data-slot"]);var Q=Fe(),ee=M(Q);{let ke=V(()=>Wt("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px",_.class));T(ee,()=>Ht,(se,oe)=>{oe(se,Jt({get"data-slot"(){return be()},get class(){return e(ke)}},()=>B,{get ref(){return D()},set ref(Ae){D(Ae)}}))})}r(He,Q),kt()}var Sr=f("<!> <!>",1),Ir=f("<!> <!> <!>",1),Cr=f("<!> <!>",1),Tr=f('<div class="flex flex-col gap-1"><!> <!></div>'),Ar=f('Reason for change <span class="text-[var(--sig-accent)]">*</span>',1),Dr=f('<div class="flex flex-col gap-1"><!> <!></div> <div class="grid grid-cols-2 gap-3"><div class="flex flex-col gap-1"><!> <!></div> <div class="flex flex-col gap-1"><!> <!></div></div> <!> <div class="flex flex-col gap-1"><!> <!></div> <div class="flex items-center justify-between"><!> <!></div> <div class="flex flex-col gap-1"><!> <!></div>',1),Er=f('<span class="px-1.5 py-px border border-[var(--sig-border-strong)]"> </span>'),Mr=f(`This memory is <strong>pinned</strong>. Deleting it requires
2
2
  force, which removes it permanently from search results.`,1),Nr=f('<div class="flex items-center gap-2"><!> <!></div>'),zr=f('Reason for deletion <span class="text-[var(--sig-accent)]">*</span>',1),Fr=f(`<div class="flex flex-col gap-2 p-3 border border-[var(--sig-border-strong)]
3
3
  bg-[var(--sig-surface-raised)]"><p class="m-0 text-[var(--sig-text-bright)] text-[11px]
4
4
  leading-[1.5] whitespace-pre-wrap break-words"> </p> <div class="flex flex-wrap gap-1 text-[9px]
@@ -1 +1 @@
1
- import{p as n,g as r,F as u,G as c,H as b,I as v,b as f,d as x,r as m,m as g}from"./BvuHLZ8E.js";import{c as p}from"./CtDFYHZq.js";var h=g("<textarea></textarea>");function y(i,a){n(a,!0);let s=r(a,"ref",15,null),o=r(a,"value",15),d=r(a,"data-slot",3,"textarea"),l=m(a,["$$slots","$$events","$$legacy","ref","value","class","data-slot"]);var e=h();u(e),c(e,t=>({"data-slot":d(),class:t,...l}),[()=>p("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a.class)]),b(e,t=>s(t),()=>s()),v(e,o),f(i,e),x()}export{y as T};
1
+ import{p as n,g as r,F as u,G as c,H as b,I as v,b as f,d as x,r as m,m as g}from"./BvuHLZ8E.js";import{c as p}from"./DHWUsgwW.js";var h=g("<textarea></textarea>");function y(i,a){n(a,!0);let s=r(a,"ref",15,null),o=r(a,"value",15),d=r(a,"data-slot",3,"textarea"),l=m(a,["$$slots","$$events","$$legacy","ref","value","class","data-slot"]);var e=h();u(e),c(e,t=>({"data-slot":d(),class:t,...l}),[()=>p("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a.class)]),b(e,t=>s(t),()=>s()),v(e,o),f(i,e),x()}export{y as T};
@@ -1 +1 @@
1
- import{p as Wt,o as $,e as Z,q as Gt,N as Yt,$ as Zt,j as r,t as c,k as F,i as t,l as a,H as Jt,v as b,b as _,d as Vt,u as P,A as G,y as R,B as Xt,D as Xe,z as u,O as Qt,w as J,m as T,c as be,f as xe,K as _e,P as ea}from"./BvuHLZ8E.js";import{h as ta,n as Qe,i as aa,j as ra,k as sa,l as ia,m as na,B as he}from"./CtDFYHZq.js";import{P as oa}from"./BEjeM6IF.js";import{T as la}from"./Cz09eUOk.js";import{C as ca}from"./rscyligZ.js";import{C as da}from"./GgMbVxEE.js";import{R as va}from"./WSFqqbf_.js";var ma=T('<div class="flex flex-1 items-center justify-center sig-label">Loading timeline...</div>'),pa=T('<div class="flex flex-1 items-center justify-center sig-label text-[var(--sig-text-muted)]">No timeline data yet.</div>'),ua=T('<button role="tab"> </button>'),fa=T('<p class="sig-label text-[var(--sig-text-muted)]">No type signals</p>'),ga=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),ba=T('<p class="sig-label text-[var(--sig-text-muted)]">No source signals</p>'),xa=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),_a=T('<p class="sig-label text-[var(--sig-text-muted)]">No tags this era</p>'),ha=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),ya=T('<p class="mt-2 sig-label text-[var(--sig-text-muted)]">No memories saved in this era yet.</p>'),Ma=T('<article class="timeline-top-card rounded-lg border border-[var(--sig-border-strong)] bg-[var(--sig-surface-raised)] p-2 svelte-1acbaf"><div class="timeline-top-card-head svelte-1acbaf"><div class="timeline-top-card-icon svelte-1acbaf"> </div> <div class="timeline-top-card-title-wrap svelte-1acbaf"><p class="timeline-top-card-title svelte-1acbaf"> </p> <p class="timeline-top-card-subtitle svelte-1acbaf"> </p></div></div> <p class="timeline-top-card-content mt-1 text-[11px] leading-relaxed text-[var(--sig-text)] line-clamp-4 svelte-1acbaf"> </p> <div class="timeline-top-card-meta mt-auto flex items-center justify-between gap-2 pt-2 text-[11px] text-[var(--sig-text-muted)] svelte-1acbaf"><p class="timeline-top-card-badge svelte-1acbaf"> </p> <p> </p></div></article>'),wa=T('<div class="timeline-top-card-grid mt-2 svelte-1acbaf"></div>'),ka=T('<div class="timeline-stack flex flex-1 min-h-0 flex-col gap-3 svelte-1acbaf"><section class="timeline-hero rounded-xl border border-[var(--sig-border)] p-3 overflow-hidden svelte-1acbaf"><div class="timeline-hero-grid svelte-1acbaf"><div class="min-w-0"><h2 class="timeline-hero-title svelte-1acbaf">Signet Evolution Timeline</h2> <p class="timeline-hero-subtitle svelte-1acbaf">Track added, evolved, and pinned memories across recap eras.</p></div> <div class="timeline-hero-metrics svelte-1acbaf"><div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Agent skills used</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">MCP servers used</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Average importance</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Pinned</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div></div></div></section> <div class="timeline-content-split flex-1 min-h-0 gap-3 svelte-1acbaf"><section class="timeline-detail-panel flex min-h-0 flex-col gap-3 overflow-x-hidden overflow-y-auto rounded-[10.5px] border-2 border-[var(--sig-border-strong)] bg-[var(--sig-surface)] p-3 svelte-1acbaf" style="--panel-pad: 0.75rem;"><div class="timeline-era-head svelte-1acbaf"><div class="timeline-era-title-row svelte-1acbaf"><p class="sig-heading timeline-era-title svelte-1acbaf"> <span class="timeline-era-title-range svelte-1acbaf"> </span></p> <div class="timeline-era-controls flex items-center gap-1 svelte-1acbaf"><!> <div role="tablist" aria-orientation="horizontal" class="flex items-center gap-1"></div> <!> <!></div></div></div> <div class="timeline-summary-grid svelte-1acbaf"><div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Added</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Tracked events captured</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Evolved</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Strengthened</span></p></div></div> <div class="timeline-mix-grid svelte-1acbaf"><div class="timeline-mix-card timeline-mix-card--type p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Type mix</p> <!></div> <div class="timeline-mix-card timeline-mix-card--source p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Source mix</p> <!></div> <div class="timeline-mix-card timeline-mix-card--tags p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Top tags</p> <!></div></div></section> <section class="timeline-top-panel rounded-[10.5px] bg-[var(--sig-surface)] p-3 svelte-1acbaf" style="border: 0.87px solid var(--sig-border);"><div class="flex items-center justify-between gap-2"><p class="sig-label text-[var(--sig-text-bright)]">Top Four Memories</p> <p class="text-[11px] text-[var(--sig-text-bright)]"> </p></div> <!></section></div></div>'),Ta=T('<p class="sig-label text-[var(--sig-danger)]"> </p>'),Sa=T('<div class="timeline-shell flex flex-col flex-1 min-h-0 overflow-hidden bg-[var(--sig-bg)] svelte-1acbaf" role="region" aria-label="Memory timeline. Use left and right arrows to move through eras."><!> <div class="flex flex-1 min-h-0 flex-col gap-3 p-3 bg-[var(--sig-bg)]"><!> <!></div></div>');function $a(et,V){Wt(V,!0);const tt="h-8 px-3 rounded-lg border text-[10px] uppercase tracking-[0.08em] font-mono transition-colors";let X=$(!1),z=$(null),N=$(Z([])),S=$(0),Q=$(Z({})),ee=$(Z({})),te=$(Z({})),I=$(null);const p=P(()=>t(N)[t(S)]??null),ye=P(()=>t(p)?t(Q)[t(p).rangeKey]??0:0);function at(e){return e.sourceBreakdown.filter(l=>Me(l.key)).length}function Me(e){const s=e.trim().toLowerCase();return s?!!(/\bmcp\b/.test(s)||/\btool[-\s]?servers?\b/.test(s)||s.includes("model context protocol")||s.includes("model-context-protocol")||s.includes("modelcontextprotocol")):!1}const we=P(()=>t(p)?Math.max(t(ee)[t(p).rangeKey]??0,at(t(p))):0),ke=P(()=>t(p)?t(te)[t(p).rangeKey]??[]:[]);function Te(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rt(e){if(Array.isArray(e))return e.filter(s=>typeof s=="string").map(s=>s.trim()).filter(s=>s.length>0);if(typeof e=="string"){const s=e.trim();if(!s)return[];if(s.startsWith("[")&&s.endsWith("]"))try{const l=JSON.parse(s);if(Array.isArray(l))return l.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0)}catch{}return s.split(",").map(l=>l.trim()).filter(l=>l.length>0)}return[]}function st(e,s,l,n){const A=l.map(i=>i.name.trim().toLowerCase()).filter(i=>i.length>0).map(i=>({name:i,pattern:new RegExp(`\\b${Te(i)}\\b`,"i")})),D=n.flatMap(i=>{const m=[];for(const y of[i.name,i.id]){const M=y.trim().toLowerCase();M.length>0&&m.push({serverId:i.id,pattern:new RegExp(`\\b${Te(M)}\\b`,"i")})}return m}),U=e.map(i=>({bucket:i,skillSet:new Set,mcpSet:new Set,hasMcpSignal:!1,startMs:Date.parse(i.start),endMs:Date.parse(i.end)}));for(const i of s){const m=Date.parse(i.created_at);if(!Number.isFinite(m))continue;const y=rt(i.tags).join(" "),M=[i.content,i.who,i.type,y].filter(g=>typeof g=="string").join(" ").toLowerCase(),L=[i.who,i.type,y].filter(g=>typeof g=="string").join(" ").toLowerCase();for(const g of U){if(m<g.startMs||m>g.endMs)continue;for(const C of A)C.pattern.test(M)&&g.skillSet.add(C.name);let W=!1;for(const C of D)C.pattern.test(M)&&(g.mcpSet.add(C.serverId),W=!0);!W&&Me(L)&&(g.hasMcpSignal=!0)}}const K={},v={};for(const i of U)K[i.bucket.rangeKey]=i.skillSet.size,v[i.bucket.rangeKey]=i.mcpSet.size>0?i.mcpSet.size:i.hasMcpSignal?1:0;return{skillUsage:K,mcpUsage:v}}function H(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:e>=1?1:e}function it(e,s){const l=new Map;for(const v of e){const i=Date.parse(v.start),m=Date.parse(v.end);!Number.isFinite(i)||!Number.isFinite(m)||l.set(v.rangeKey,{startMs:i,endMs:m})}const n=l.get("today")??null,A=l.get("last_week")??null;function D(v){const i=l.get(v.rangeKey),m=Date.parse(v.start),y=Date.parse(v.end),M={startMs:Number.isFinite(m)?m:Number.NEGATIVE_INFINITY,endMs:Number.isFinite(y)?y:Number.POSITIVE_INFINITY};if(!i)return M;const L=i.startMs;let g=i.endMs;return v.rangeKey==="last_week"&&n?g=Math.min(g,n.startMs-1):v.rangeKey==="one_month"&&(A?g=Math.min(g,A.startMs-1):n&&(g=Math.min(g,n.startMs-1))),g<L?M:{startMs:L,endMs:g}}const U=e.map(v=>{const i=D(v);return{bucket:v,startMs:i.startMs,endMs:i.endMs,candidates:[]}});for(const v of s){const i=Date.parse(v.created_at);if(Number.isFinite(i))for(const m of U){if(i<m.startMs||i>m.endMs)continue;const y=Math.max(1,m.endMs-m.startMs),M=Math.max(0,Math.min(1,(i-m.startMs)/y)),L=H(v.importance)*100+(v.pinned?24:0)+M*8;m.candidates.push({memory:v,score:L,createdAt:i})}}const K={};for(const v of U)v.candidates.sort((i,m)=>{if(m.score!==i.score)return m.score-i.score;const y=H(i.memory.importance),M=H(m.memory.importance);return M!==y?M-y:m.createdAt!==i.createdAt?m.createdAt-i.createdAt:i.memory.id.localeCompare(m.memory.id)}),K[v.bucket.rangeKey]=v.candidates.slice(0,4).map(i=>i.memory);return K}function q(e=1){t(N).length!==0&&b(S,Math.min(t(N).length-1,t(S)+e),!0)}function O(e=1){t(N).length!==0&&b(S,Math.max(0,t(S)-e),!0)}function ae(e){V.ontimelinegeneratedforchange&&V.ontimelinegeneratedforchange(e)}async function nt(){b(X,!0),b(z,null);try{const e=ra(5e3,0),[s,l,n,A]=await Promise.all([sa({fallbackMemories:e.then(U=>U.memories)}),ia(),na(),e]);b(N,s.buckets,!0),ae(s.generatedFor);const D=st(s.buckets,A.memories,l,n.servers);b(Q,D.skillUsage,!0),b(ee,D.mcpUsage,!0),b(te,it(s.buckets,A.memories),!0),b(S,0),s.error&&b(z,s.error,!0)}catch{b(z,"Failed to load timeline."),b(N,[],!0),ae(""),b(Q,{},!0),b(ee,{},!0),b(te,{},!0)}finally{b(X,!1)}}function ot(e,s){const l={month:"short",day:"numeric",timeZone:"UTC"},n=new Date(e).toLocaleDateString("en-US",l),A=new Date(s).toLocaleDateString("en-US",{...l,year:"numeric"});return`${n} - ${A}`}function lt(e,s){const l=Date.parse(e);if(!Number.isFinite(l))return"Unknown";const n=new Date(l);return s==="today"?n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZone:"UTC"}):n.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZone:"UTC"})}function ct(e){return`${Math.round(H(e)*100)}%`}function re(e,s,l){return e===1?s:l}function dt(e){const s=e.split(/[-_.\s]+/).map(l=>l.trim()).filter(l=>l.length>0);return s.length>=2?`${s[0]?.[0]??""}${s[1]?.[0]??""}`.toUpperCase():e.slice(0,2).toUpperCase()||"M"}function vt(e){return e.rangeKey==="last_week"?"Week":e.rangeKey==="one_month"?"Month":"Today"}function mt(e){if(Qe.activeTab!=="timeline")return;const s=e.target;if(s instanceof HTMLElement){const n=s.tagName;if(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||s.isContentEditable)return}if(s instanceof HTMLElement&&s.hasAttribute("data-memory-tab")){if(e.key==="ArrowDown"){e.preventDefault();const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus()}return}if(s instanceof HTMLElement&&s.closest('.timeline-era-controls [role="tablist"]')){if(e.key==="ArrowUp"){e.preventDefault(),O(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowDown"){e.preventDefault(),q(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowRight"){e.preventDefault(),q(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowLeft"){e.preventDefault(),O(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}return}if(e.key==="ArrowRight"){e.preventDefault(),q(e.shiftKey?3:1);return}if(e.key==="ArrowLeft"){e.preventDefault(),O(e.shiftKey?3:1);return}if(e.key==="PageDown"){e.preventDefault(),q(3);return}if(e.key==="PageUp"){e.preventDefault(),O(3);return}}Gt(()=>(nt(),()=>{ae("")}));var Y=Sa();Yt("keydown",Zt,mt);var Se=r(Y);oa(Se,{title:"Timeline",children:(e,s)=>{la(e,{group:"memory",get tabs(){return aa},get activeTab(){return Qe.activeTab},onselect:(l,n)=>ta(n)})}});var Ae=c(Se,2),Ee=r(Ae);{var pt=e=>{var s=ma();_(e,s)},ut=e=>{var s=pa();_(e,s)},ft=e=>{var s=ka(),l=r(s),n=r(l),A=c(r(n),2),D=r(A),U=c(r(D),2),K=r(U);a(U),a(D);var v=c(D,2),i=c(r(v),2),m=r(i);a(i),a(v);var y=c(v,2),M=c(r(y),2),L=r(M);a(M),a(y);var g=c(y,2),W=c(r(g),2),C=r(W);a(W),a(g),a(A),a(n),a(l);var De=c(l,2),se=r(De),ie=r(se),Ue=r(ie),ne=r(Ue),Ne=r(ne),Be=c(Ne),xt=r(Be,!0);a(Be),a(ne);var Le=c(ne,2),$e=r(Le);{let o=P(()=>t(S)<=0);he($e,{variant:"outline",size:"sm",class:"h-8 px-2",onclick:()=>O(),get disabled(){return t(o)},title:"Move to newer era",children:(d,x)=>{ca(d,{class:"size-3.5"})},$$slots:{default:!0}})}var oe=c($e,2);G(oe,23,()=>t(N),o=>o.eraIndex,(o,d,x)=>{var f=ua(),w=r(f,!0);a(f),R(h=>{Xt(f,1,`${tt} ${t(x)===t(S)?"border-[var(--sig-accent)] bg-[color-mix(in_srgb,var(--sig-surface-raised)_76%,transparent)] text-[var(--sig-text-bright)]":"border-[var(--sig-border-strong)] text-[var(--sig-text-muted)] hover:text-[var(--sig-text-bright)]"}`,"svelte-1acbaf"),Xe(f,"aria-selected",t(x)===t(S)),Xe(f,"tabindex",t(x)===t(S)?0:-1),u(w,h)},[()=>vt(t(d))]),Qt("click",f,()=>{b(S,t(x),!0)}),_(o,f)}),a(oe);var Ie=c(oe,2);{let o=P(()=>t(S)>=t(N).length-1);he(Ie,{variant:"outline",size:"sm",class:"h-8 px-2",onclick:()=>q(),get disabled(){return t(o)},title:"Move to older era",children:(d,x)=>{da(d,{class:"size-3.5"})},$$slots:{default:!0}})}var _t=c(Ie,2);he(_t,{variant:"ghost",size:"sm",class:"h-8 px-2 sig-label",onclick:()=>{b(S,0)},title:"Jump to today",children:(o,d)=>{va(o,{class:"size-3.5"})},$$slots:{default:!0}}),a(Le),a(Ue),a(ie);var le=c(ie,2),ce=r(le),Ke=r(ce),Ce=r(Ke),ht=r(Ce,!0);a(Ce),J(2),a(Ke),a(ce);var de=c(ce,2),je=r(de),Re=r(je),yt=r(Re,!0);a(Re),J(2),a(je),a(de);var ve=c(de,2),Fe=r(ve),Pe=r(Fe),Mt=r(Pe,!0);a(Pe),J(2),a(Fe),a(ve);var ze=c(ve,2),He=r(ze),qe=r(He),wt=r(qe,!0);a(qe),J(2),a(He),a(ze),a(le);var Oe=c(le,2),me=r(Oe),kt=c(r(me),2);{var Tt=o=>{var d=fa();_(o,d)},St=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).typeBreakdown,_e,(f,w)=>{var h=ga(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(kt,o=>{t(p).typeBreakdown.length===0?o(Tt):o(St,-1)})}a(me);var pe=c(me,2),At=c(r(pe),2);{var Et=o=>{var d=ba();_(o,d)},Dt=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).sourceBreakdown,_e,(f,w)=>{var h=xa(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(At,o=>{t(p).sourceBreakdown.length===0?o(Et):o(Dt,-1)})}a(pe);var We=c(pe,2),Ut=c(r(We),2);{var Nt=o=>{var d=_a();_(o,d)},Bt=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).topTags,_e,(f,w)=>{var h=ha(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(Ut,o=>{t(p).topTags.length===0?o(Nt):o(Bt,-1)})}a(We),a(Oe),a(se);var Ge=c(se,2),ue=r(Ge),Ye=c(r(ue),2),Lt=r(Ye,!0);a(Ye),a(ue);var $t=c(ue,2);{var It=o=>{var d=ya();_(o,d)},Kt=o=>{var d=wa();G(d,21,()=>t(ke),x=>x.id,(x,f)=>{var w=Ma(),h=r(w),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E),Ct=r(B,!0);a(B);var Ze=c(B,2),jt=r(Ze,!0);a(Ze),a(E),a(h);var fe=c(h,2),Rt=r(fe,!0);a(fe);var Je=c(fe,2),ge=r(Je),Ft=r(ge);a(ge);var Ve=c(ge,2),Pt=r(Ve,!0);a(Ve),a(Je),a(w),R((zt,Ht,qt,Ot)=>{u(j,zt),u(Ct,t(f).who||"Unknown source"),u(jt,Ht),u(Rt,t(f).content),u(Ft,`imp ${qt??""}`),u(Pt,Ot)},[()=>dt(t(f).who||t(f).type||"memory"),()=>t(f).type?.trim()||"memory",()=>ct(t(f).importance),()=>lt(t(f).created_at,t(p).rangeKey)]),_(x,w)}),a(d),_(o,d)};F($t,o=>{t(ke).length===0?o(It):o(Kt,-1)})}a(Ge),a(De),a(s),R((o,d,x,f,w)=>{u(K,`${t(ye)??""} ${o??""}`),u(m,`${t(we)??""} ${d??""}`),u(L,`${x??""}% avg`),u(C,`${t(p).pinned??""} ${f??""}`),u(Ne,`${t(p).label??""}: `),u(xt,w),u(ht,t(p).memoriesAdded),u(yt,t(p).trackedEvents),u(Mt,t(p).evolved),u(wt,t(p).strengthened),u(Lt,t(p).label)},[()=>re(t(ye),"skill","skills"),()=>re(t(we),"server","servers"),()=>Math.round(H(t(p).avgImportance)*100),()=>re(t(p).pinned,"card","cards"),()=>ot(t(p).start,t(p).end)]),_(e,s)};F(Ee,e=>{t(X)?e(pt):t(N).length===0?e(ut,1):t(p)&&e(ft,2)})}var gt=c(Ee,2);{var bt=e=>{var s=Ta(),l=r(s,!0);a(s),R(()=>u(l,t(z))),_(e,s)};F(gt,e=>{t(z)&&e(bt)})}a(Ae),a(Y),Jt(Y,e=>b(I,e),()=>t(I)),_(et,Y),Vt()}ea(["click"]);export{$a as default};
1
+ import{p as Wt,o as $,e as Z,q as Gt,N as Yt,$ as Zt,j as r,t as c,k as F,i as t,l as a,H as Jt,v as b,b as _,d as Vt,u as P,A as G,y as R,B as Xt,D as Xe,z as u,O as Qt,w as J,m as T,c as be,f as xe,K as _e,P as ea}from"./BvuHLZ8E.js";import{h as ta,n as Qe,i as aa,j as ra,k as sa,l as ia,m as na,B as he}from"./DHWUsgwW.js";import{P as oa}from"./BEjeM6IF.js";import{T as la}from"./Cz09eUOk.js";import{C as ca}from"./wrMLj0eQ.js";import{C as da}from"./D6QLKZ1G.js";import{R as va}from"./D7U6-q2s.js";var ma=T('<div class="flex flex-1 items-center justify-center sig-label">Loading timeline...</div>'),pa=T('<div class="flex flex-1 items-center justify-center sig-label text-[var(--sig-text-muted)]">No timeline data yet.</div>'),ua=T('<button role="tab"> </button>'),fa=T('<p class="sig-label text-[var(--sig-text-muted)]">No type signals</p>'),ga=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),ba=T('<p class="sig-label text-[var(--sig-text-muted)]">No source signals</p>'),xa=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),_a=T('<p class="sig-label text-[var(--sig-text-muted)]">No tags this era</p>'),ha=T('<div class="flex w-full items-center justify-between text-[11px] text-[var(--sig-text)]"><span> </span> <span class="text-[var(--sig-text-muted)]"> </span></div>'),ya=T('<p class="mt-2 sig-label text-[var(--sig-text-muted)]">No memories saved in this era yet.</p>'),Ma=T('<article class="timeline-top-card rounded-lg border border-[var(--sig-border-strong)] bg-[var(--sig-surface-raised)] p-2 svelte-1acbaf"><div class="timeline-top-card-head svelte-1acbaf"><div class="timeline-top-card-icon svelte-1acbaf"> </div> <div class="timeline-top-card-title-wrap svelte-1acbaf"><p class="timeline-top-card-title svelte-1acbaf"> </p> <p class="timeline-top-card-subtitle svelte-1acbaf"> </p></div></div> <p class="timeline-top-card-content mt-1 text-[11px] leading-relaxed text-[var(--sig-text)] line-clamp-4 svelte-1acbaf"> </p> <div class="timeline-top-card-meta mt-auto flex items-center justify-between gap-2 pt-2 text-[11px] text-[var(--sig-text-muted)] svelte-1acbaf"><p class="timeline-top-card-badge svelte-1acbaf"> </p> <p> </p></div></article>'),wa=T('<div class="timeline-top-card-grid mt-2 svelte-1acbaf"></div>'),ka=T('<div class="timeline-stack flex flex-1 min-h-0 flex-col gap-3 svelte-1acbaf"><section class="timeline-hero rounded-xl border border-[var(--sig-border)] p-3 overflow-hidden svelte-1acbaf"><div class="timeline-hero-grid svelte-1acbaf"><div class="min-w-0"><h2 class="timeline-hero-title svelte-1acbaf">Signet Evolution Timeline</h2> <p class="timeline-hero-subtitle svelte-1acbaf">Track added, evolved, and pinned memories across recap eras.</p></div> <div class="timeline-hero-metrics svelte-1acbaf"><div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Agent skills used</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">MCP servers used</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Average importance</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div> <div class="timeline-hero-metric svelte-1acbaf"><span class="timeline-hero-metric-label svelte-1acbaf">Pinned</span> <strong class="timeline-hero-metric-display svelte-1acbaf"> </strong></div></div></div></section> <div class="timeline-content-split flex-1 min-h-0 gap-3 svelte-1acbaf"><section class="timeline-detail-panel flex min-h-0 flex-col gap-3 overflow-x-hidden overflow-y-auto rounded-[10.5px] border-2 border-[var(--sig-border-strong)] bg-[var(--sig-surface)] p-3 svelte-1acbaf" style="--panel-pad: 0.75rem;"><div class="timeline-era-head svelte-1acbaf"><div class="timeline-era-title-row svelte-1acbaf"><p class="sig-heading timeline-era-title svelte-1acbaf"> <span class="timeline-era-title-range svelte-1acbaf"> </span></p> <div class="timeline-era-controls flex items-center gap-1 svelte-1acbaf"><!> <div role="tablist" aria-orientation="horizontal" class="flex items-center gap-1"></div> <!> <!></div></div></div> <div class="timeline-summary-grid svelte-1acbaf"><div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Added</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Tracked events captured</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Evolved</span></p></div> <div class="flex min-h-[56px] items-center justify-center rounded-[6.5px] p-2" style="border: 0.87px solid var(--sig-border-strong); background: var(--sig-surface)"><p class="timeline-summary-line svelte-1acbaf"><span class="sig-heading leading-none"> </span> <span class="timeline-summary-copy svelte-1acbaf">- Strengthened</span></p></div></div> <div class="timeline-mix-grid svelte-1acbaf"><div class="timeline-mix-card timeline-mix-card--type p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Type mix</p> <!></div> <div class="timeline-mix-card timeline-mix-card--source p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Source mix</p> <!></div> <div class="timeline-mix-card timeline-mix-card--tags p-2 svelte-1acbaf"><p class="timeline-mix-header mb-1 svelte-1acbaf">Top tags</p> <!></div></div></section> <section class="timeline-top-panel rounded-[10.5px] bg-[var(--sig-surface)] p-3 svelte-1acbaf" style="border: 0.87px solid var(--sig-border);"><div class="flex items-center justify-between gap-2"><p class="sig-label text-[var(--sig-text-bright)]">Top Four Memories</p> <p class="text-[11px] text-[var(--sig-text-bright)]"> </p></div> <!></section></div></div>'),Ta=T('<p class="sig-label text-[var(--sig-danger)]"> </p>'),Sa=T('<div class="timeline-shell flex flex-col flex-1 min-h-0 overflow-hidden bg-[var(--sig-bg)] svelte-1acbaf" role="region" aria-label="Memory timeline. Use left and right arrows to move through eras."><!> <div class="flex flex-1 min-h-0 flex-col gap-3 p-3 bg-[var(--sig-bg)]"><!> <!></div></div>');function $a(et,V){Wt(V,!0);const tt="h-8 px-3 rounded-lg border text-[10px] uppercase tracking-[0.08em] font-mono transition-colors";let X=$(!1),z=$(null),N=$(Z([])),S=$(0),Q=$(Z({})),ee=$(Z({})),te=$(Z({})),I=$(null);const p=P(()=>t(N)[t(S)]??null),ye=P(()=>t(p)?t(Q)[t(p).rangeKey]??0:0);function at(e){return e.sourceBreakdown.filter(l=>Me(l.key)).length}function Me(e){const s=e.trim().toLowerCase();return s?!!(/\bmcp\b/.test(s)||/\btool[-\s]?servers?\b/.test(s)||s.includes("model context protocol")||s.includes("model-context-protocol")||s.includes("modelcontextprotocol")):!1}const we=P(()=>t(p)?Math.max(t(ee)[t(p).rangeKey]??0,at(t(p))):0),ke=P(()=>t(p)?t(te)[t(p).rangeKey]??[]:[]);function Te(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rt(e){if(Array.isArray(e))return e.filter(s=>typeof s=="string").map(s=>s.trim()).filter(s=>s.length>0);if(typeof e=="string"){const s=e.trim();if(!s)return[];if(s.startsWith("[")&&s.endsWith("]"))try{const l=JSON.parse(s);if(Array.isArray(l))return l.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0)}catch{}return s.split(",").map(l=>l.trim()).filter(l=>l.length>0)}return[]}function st(e,s,l,n){const A=l.map(i=>i.name.trim().toLowerCase()).filter(i=>i.length>0).map(i=>({name:i,pattern:new RegExp(`\\b${Te(i)}\\b`,"i")})),D=n.flatMap(i=>{const m=[];for(const y of[i.name,i.id]){const M=y.trim().toLowerCase();M.length>0&&m.push({serverId:i.id,pattern:new RegExp(`\\b${Te(M)}\\b`,"i")})}return m}),U=e.map(i=>({bucket:i,skillSet:new Set,mcpSet:new Set,hasMcpSignal:!1,startMs:Date.parse(i.start),endMs:Date.parse(i.end)}));for(const i of s){const m=Date.parse(i.created_at);if(!Number.isFinite(m))continue;const y=rt(i.tags).join(" "),M=[i.content,i.who,i.type,y].filter(g=>typeof g=="string").join(" ").toLowerCase(),L=[i.who,i.type,y].filter(g=>typeof g=="string").join(" ").toLowerCase();for(const g of U){if(m<g.startMs||m>g.endMs)continue;for(const C of A)C.pattern.test(M)&&g.skillSet.add(C.name);let W=!1;for(const C of D)C.pattern.test(M)&&(g.mcpSet.add(C.serverId),W=!0);!W&&Me(L)&&(g.hasMcpSignal=!0)}}const K={},v={};for(const i of U)K[i.bucket.rangeKey]=i.skillSet.size,v[i.bucket.rangeKey]=i.mcpSet.size>0?i.mcpSet.size:i.hasMcpSignal?1:0;return{skillUsage:K,mcpUsage:v}}function H(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:e>=1?1:e}function it(e,s){const l=new Map;for(const v of e){const i=Date.parse(v.start),m=Date.parse(v.end);!Number.isFinite(i)||!Number.isFinite(m)||l.set(v.rangeKey,{startMs:i,endMs:m})}const n=l.get("today")??null,A=l.get("last_week")??null;function D(v){const i=l.get(v.rangeKey),m=Date.parse(v.start),y=Date.parse(v.end),M={startMs:Number.isFinite(m)?m:Number.NEGATIVE_INFINITY,endMs:Number.isFinite(y)?y:Number.POSITIVE_INFINITY};if(!i)return M;const L=i.startMs;let g=i.endMs;return v.rangeKey==="last_week"&&n?g=Math.min(g,n.startMs-1):v.rangeKey==="one_month"&&(A?g=Math.min(g,A.startMs-1):n&&(g=Math.min(g,n.startMs-1))),g<L?M:{startMs:L,endMs:g}}const U=e.map(v=>{const i=D(v);return{bucket:v,startMs:i.startMs,endMs:i.endMs,candidates:[]}});for(const v of s){const i=Date.parse(v.created_at);if(Number.isFinite(i))for(const m of U){if(i<m.startMs||i>m.endMs)continue;const y=Math.max(1,m.endMs-m.startMs),M=Math.max(0,Math.min(1,(i-m.startMs)/y)),L=H(v.importance)*100+(v.pinned?24:0)+M*8;m.candidates.push({memory:v,score:L,createdAt:i})}}const K={};for(const v of U)v.candidates.sort((i,m)=>{if(m.score!==i.score)return m.score-i.score;const y=H(i.memory.importance),M=H(m.memory.importance);return M!==y?M-y:m.createdAt!==i.createdAt?m.createdAt-i.createdAt:i.memory.id.localeCompare(m.memory.id)}),K[v.bucket.rangeKey]=v.candidates.slice(0,4).map(i=>i.memory);return K}function q(e=1){t(N).length!==0&&b(S,Math.min(t(N).length-1,t(S)+e),!0)}function O(e=1){t(N).length!==0&&b(S,Math.max(0,t(S)-e),!0)}function ae(e){V.ontimelinegeneratedforchange&&V.ontimelinegeneratedforchange(e)}async function nt(){b(X,!0),b(z,null);try{const e=ra(5e3,0),[s,l,n,A]=await Promise.all([sa({fallbackMemories:e.then(U=>U.memories)}),ia(),na(),e]);b(N,s.buckets,!0),ae(s.generatedFor);const D=st(s.buckets,A.memories,l,n.servers);b(Q,D.skillUsage,!0),b(ee,D.mcpUsage,!0),b(te,it(s.buckets,A.memories),!0),b(S,0),s.error&&b(z,s.error,!0)}catch{b(z,"Failed to load timeline."),b(N,[],!0),ae(""),b(Q,{},!0),b(ee,{},!0),b(te,{},!0)}finally{b(X,!1)}}function ot(e,s){const l={month:"short",day:"numeric",timeZone:"UTC"},n=new Date(e).toLocaleDateString("en-US",l),A=new Date(s).toLocaleDateString("en-US",{...l,year:"numeric"});return`${n} - ${A}`}function lt(e,s){const l=Date.parse(e);if(!Number.isFinite(l))return"Unknown";const n=new Date(l);return s==="today"?n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZone:"UTC"}):n.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZone:"UTC"})}function ct(e){return`${Math.round(H(e)*100)}%`}function re(e,s,l){return e===1?s:l}function dt(e){const s=e.split(/[-_.\s]+/).map(l=>l.trim()).filter(l=>l.length>0);return s.length>=2?`${s[0]?.[0]??""}${s[1]?.[0]??""}`.toUpperCase():e.slice(0,2).toUpperCase()||"M"}function vt(e){return e.rangeKey==="last_week"?"Week":e.rangeKey==="one_month"?"Month":"Today"}function mt(e){if(Qe.activeTab!=="timeline")return;const s=e.target;if(s instanceof HTMLElement){const n=s.tagName;if(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||s.isContentEditable)return}if(s instanceof HTMLElement&&s.hasAttribute("data-memory-tab")){if(e.key==="ArrowDown"){e.preventDefault();const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus()}return}if(s instanceof HTMLElement&&s.closest('.timeline-era-controls [role="tablist"]')){if(e.key==="ArrowUp"){e.preventDefault(),O(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowDown"){e.preventDefault(),q(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowRight"){e.preventDefault(),q(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}if(e.key==="ArrowLeft"){e.preventDefault(),O(e.shiftKey?3:1);const n=t(I)?.querySelector('.timeline-era-controls [role="tablist"] button[aria-selected="true"]');n instanceof HTMLElement&&n.focus();return}return}if(e.key==="ArrowRight"){e.preventDefault(),q(e.shiftKey?3:1);return}if(e.key==="ArrowLeft"){e.preventDefault(),O(e.shiftKey?3:1);return}if(e.key==="PageDown"){e.preventDefault(),q(3);return}if(e.key==="PageUp"){e.preventDefault(),O(3);return}}Gt(()=>(nt(),()=>{ae("")}));var Y=Sa();Yt("keydown",Zt,mt);var Se=r(Y);oa(Se,{title:"Timeline",children:(e,s)=>{la(e,{group:"memory",get tabs(){return aa},get activeTab(){return Qe.activeTab},onselect:(l,n)=>ta(n)})}});var Ae=c(Se,2),Ee=r(Ae);{var pt=e=>{var s=ma();_(e,s)},ut=e=>{var s=pa();_(e,s)},ft=e=>{var s=ka(),l=r(s),n=r(l),A=c(r(n),2),D=r(A),U=c(r(D),2),K=r(U);a(U),a(D);var v=c(D,2),i=c(r(v),2),m=r(i);a(i),a(v);var y=c(v,2),M=c(r(y),2),L=r(M);a(M),a(y);var g=c(y,2),W=c(r(g),2),C=r(W);a(W),a(g),a(A),a(n),a(l);var De=c(l,2),se=r(De),ie=r(se),Ue=r(ie),ne=r(Ue),Ne=r(ne),Be=c(Ne),xt=r(Be,!0);a(Be),a(ne);var Le=c(ne,2),$e=r(Le);{let o=P(()=>t(S)<=0);he($e,{variant:"outline",size:"sm",class:"h-8 px-2",onclick:()=>O(),get disabled(){return t(o)},title:"Move to newer era",children:(d,x)=>{ca(d,{class:"size-3.5"})},$$slots:{default:!0}})}var oe=c($e,2);G(oe,23,()=>t(N),o=>o.eraIndex,(o,d,x)=>{var f=ua(),w=r(f,!0);a(f),R(h=>{Xt(f,1,`${tt} ${t(x)===t(S)?"border-[var(--sig-accent)] bg-[color-mix(in_srgb,var(--sig-surface-raised)_76%,transparent)] text-[var(--sig-text-bright)]":"border-[var(--sig-border-strong)] text-[var(--sig-text-muted)] hover:text-[var(--sig-text-bright)]"}`,"svelte-1acbaf"),Xe(f,"aria-selected",t(x)===t(S)),Xe(f,"tabindex",t(x)===t(S)?0:-1),u(w,h)},[()=>vt(t(d))]),Qt("click",f,()=>{b(S,t(x),!0)}),_(o,f)}),a(oe);var Ie=c(oe,2);{let o=P(()=>t(S)>=t(N).length-1);he(Ie,{variant:"outline",size:"sm",class:"h-8 px-2",onclick:()=>q(),get disabled(){return t(o)},title:"Move to older era",children:(d,x)=>{da(d,{class:"size-3.5"})},$$slots:{default:!0}})}var _t=c(Ie,2);he(_t,{variant:"ghost",size:"sm",class:"h-8 px-2 sig-label",onclick:()=>{b(S,0)},title:"Jump to today",children:(o,d)=>{va(o,{class:"size-3.5"})},$$slots:{default:!0}}),a(Le),a(Ue),a(ie);var le=c(ie,2),ce=r(le),Ke=r(ce),Ce=r(Ke),ht=r(Ce,!0);a(Ce),J(2),a(Ke),a(ce);var de=c(ce,2),je=r(de),Re=r(je),yt=r(Re,!0);a(Re),J(2),a(je),a(de);var ve=c(de,2),Fe=r(ve),Pe=r(Fe),Mt=r(Pe,!0);a(Pe),J(2),a(Fe),a(ve);var ze=c(ve,2),He=r(ze),qe=r(He),wt=r(qe,!0);a(qe),J(2),a(He),a(ze),a(le);var Oe=c(le,2),me=r(Oe),kt=c(r(me),2);{var Tt=o=>{var d=fa();_(o,d)},St=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).typeBreakdown,_e,(f,w)=>{var h=ga(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(kt,o=>{t(p).typeBreakdown.length===0?o(Tt):o(St,-1)})}a(me);var pe=c(me,2),At=c(r(pe),2);{var Et=o=>{var d=ba();_(o,d)},Dt=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).sourceBreakdown,_e,(f,w)=>{var h=xa(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(At,o=>{t(p).sourceBreakdown.length===0?o(Et):o(Dt,-1)})}a(pe);var We=c(pe,2),Ut=c(r(We),2);{var Nt=o=>{var d=_a();_(o,d)},Bt=o=>{var d=be(),x=xe(d);G(x,17,()=>t(p).topTags,_e,(f,w)=>{var h=ha(),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E,!0);a(E),a(h),R(()=>{u(j,t(w).key),u(B,t(w).count)}),_(f,h)}),_(o,d)};F(Ut,o=>{t(p).topTags.length===0?o(Nt):o(Bt,-1)})}a(We),a(Oe),a(se);var Ge=c(se,2),ue=r(Ge),Ye=c(r(ue),2),Lt=r(Ye,!0);a(Ye),a(ue);var $t=c(ue,2);{var It=o=>{var d=ya();_(o,d)},Kt=o=>{var d=wa();G(d,21,()=>t(ke),x=>x.id,(x,f)=>{var w=Ma(),h=r(w),k=r(h),j=r(k,!0);a(k);var E=c(k,2),B=r(E),Ct=r(B,!0);a(B);var Ze=c(B,2),jt=r(Ze,!0);a(Ze),a(E),a(h);var fe=c(h,2),Rt=r(fe,!0);a(fe);var Je=c(fe,2),ge=r(Je),Ft=r(ge);a(ge);var Ve=c(ge,2),Pt=r(Ve,!0);a(Ve),a(Je),a(w),R((zt,Ht,qt,Ot)=>{u(j,zt),u(Ct,t(f).who||"Unknown source"),u(jt,Ht),u(Rt,t(f).content),u(Ft,`imp ${qt??""}`),u(Pt,Ot)},[()=>dt(t(f).who||t(f).type||"memory"),()=>t(f).type?.trim()||"memory",()=>ct(t(f).importance),()=>lt(t(f).created_at,t(p).rangeKey)]),_(x,w)}),a(d),_(o,d)};F($t,o=>{t(ke).length===0?o(It):o(Kt,-1)})}a(Ge),a(De),a(s),R((o,d,x,f,w)=>{u(K,`${t(ye)??""} ${o??""}`),u(m,`${t(we)??""} ${d??""}`),u(L,`${x??""}% avg`),u(C,`${t(p).pinned??""} ${f??""}`),u(Ne,`${t(p).label??""}: `),u(xt,w),u(ht,t(p).memoriesAdded),u(yt,t(p).trackedEvents),u(Mt,t(p).evolved),u(wt,t(p).strengthened),u(Lt,t(p).label)},[()=>re(t(ye),"skill","skills"),()=>re(t(we),"server","servers"),()=>Math.round(H(t(p).avgImportance)*100),()=>re(t(p).pinned,"card","cards"),()=>ot(t(p).start,t(p).end)]),_(e,s)};F(Ee,e=>{t(X)?e(pt):t(N).length===0?e(ut,1):t(p)&&e(ft,2)})}var gt=c(Ee,2);{var bt=e=>{var s=Ta(),l=r(s,!0);a(s),R(()=>u(l,t(z))),_(e,s)};F(gt,e=>{t(z)&&e(bt)})}a(Ae),a(Y),Jt(Y,e=>b(I,e),()=>t(I)),_(et,Y),Vt()}ea(["click"]);export{$a as default};
@@ -1,4 +1,4 @@
1
- import{p as Ae,o as k,e as xe,q as Ge,j as n,t as d,k as O,i as r,l as a,b as i,d as Oe,v as g,f as be,w as H,x as _,y as h,z as m,A as he,B as $e,m as x,u as Y,h as oe,s as qe,D as Le}from"./BvuHLZ8E.js";import{f as Ve,n as Je,E as Ke,g as Qe,a as Ue,B as q,r as We,t as p,b as Xe,s as Ye,d as Ze}from"./CtDFYHZq.js";import{P as er}from"./BEjeM6IF.js";import{T as rr}from"./Cz09eUOk.js";import{B as sr}from"./LP88EgsQ.js";import{P as tr,a as ar,b as nr}from"./DoWs5OiX.js";var ir=x('<div class="flex flex-1 items-center justify-center sig-label">Loading connectors...</div>'),or=x(`<div class="flex items-center gap-3 px-3 py-2.5
1
+ import{p as Ae,o as k,e as xe,q as Ge,j as n,t as d,k as O,i as r,l as a,b as i,d as Oe,v as g,f as be,w as H,x as _,y as h,z as m,A as he,B as $e,m as x,u as Y,h as oe,s as qe,D as Le}from"./BvuHLZ8E.js";import{f as Ve,n as Je,E as Ke,g as Qe,a as Ue,B as q,r as We,t as p,b as Xe,s as Ye,d as Ze}from"./DHWUsgwW.js";import{P as er}from"./BEjeM6IF.js";import{T as rr}from"./Cz09eUOk.js";import{B as sr}from"./rJgf4rMr.js";import{P as tr,a as ar,b as nr}from"./fw0WwVa3.js";var ir=x('<div class="flex flex-1 items-center justify-center sig-label">Loading connectors...</div>'),or=x(`<div class="flex items-center gap-3 px-3 py-2.5
2
2
  border border-[var(--sig-border)]
3
3
  bg-[var(--sig-surface-raised)]"><span></span> <div class="flex flex-col gap-0.5 min-w-0 flex-1"><span class="text-[12px] font-medium text-[var(--sig-text-bright)]
4
4
  font-display tracking-[0.04em]"> </span> <span class="sig-eyebrow truncate"> </span></div> <div class="flex flex-col items-end gap-0.5 shrink-0"><span> </span> <span class="sig-eyebrow"><!></span></div></div>`),lr=x(`<div class="flex items-center justify-center py-8
@@ -1 +1 @@
1
- import{p,s as d,c as l,f as c,a as i,n as m,b as f,d as h,r as u}from"./BvuHLZ8E.js";import{I as $}from"./CtDFYHZq.js";function H(o,a){p(a,!0);let s=u(a,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];$(o,d({name:"folder-open"},()=>s,{get iconNode(){return r},children:(t,_)=>{var e=l(),n=c(e);i(n,()=>a.children??m),f(t,e)},$$slots:{default:!0}})),h()}export{H as F};
1
+ import{p,s as d,c as l,f as c,a as i,n as m,b as f,d as h,r as u}from"./BvuHLZ8E.js";import{I as $}from"./DHWUsgwW.js";function H(o,a){p(a,!0);let s=u(a,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];$(o,d({name:"folder-open"},()=>s,{get iconNode(){return r},children:(t,_)=>{var e=l(),n=c(e);i(n,()=>a.children??m),f(t,e)},$$slots:{default:!0}})),h()}export{H as F};