vestige/apps/dashboard/build/_app/immutable/nodes/9.CFdF6F7Z.js
Sam Valladares c2d28f3433 feat: Vestige v2.0.0 "Cognitive Leap" — 3D dashboard, HyDE search, WebSocket events
The biggest release in Vestige history. Complete visual and cognitive overhaul.

Dashboard:
- SvelteKit 2 + Three.js 3D neural visualization at localhost:3927/dashboard
- 7 interactive pages: Graph, Memories, Timeline, Feed, Explore, Intentions, Stats
- WebSocket event bus with 16 event types, real-time 3D animations
- Bloom post-processing, GPU instanced rendering, force-directed layout
- Dream visualization mode, FSRS retention curves, command palette (Cmd+K)
- Keyboard shortcuts, responsive mobile layout, PWA installable
- Single binary deployment via include_dir! (22MB)

Engine:
- HyDE query expansion (intent classification + 3-5 semantic variants + centroid)
- fastembed 5.11 with optional Nomic v2 MoE + Qwen3 reranker + Metal GPU
- Emotional memory module (#29)
- Criterion benchmark suite

Backend:
- Axum WebSocket at /ws with heartbeat + event broadcast
- 7 new REST endpoints for cognitive operations
- Event emission from MCP tools via shared broadcast channel
- CORS for SvelteKit dev mode

Distribution:
- GitHub issue templates (bug report, feature request)
- CHANGELOG with comprehensive v2.0 release notes
- README updated with dashboard docs, architecture diagram, comparison table

734 tests passing, zero warnings, 22MB release binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 03:07:25 -06:00

2 lines
9.8 KiB
JavaScript

import{a as v,f as l,t as pe}from"../chunks/wmwKEafM.js";import{p as He,H as Je,s as m,t as w,a as Le,d as k,g as s,c as t,e as i,r as e,G as _,f as Pe,u as j}from"../chunks/DleE0ac1.js";import{d as We,a as X,s as u}from"../chunks/8PSwG_AU.js";import{i as p}from"../chunks/BHs8FnOA.js";import{e as Z,i as ee}from"../chunks/BsRos8Kb.js";import{s as be}from"../chunks/BK028jHP.js";import{s as fe}from"../chunks/D6n3ggvw.js";import{s as Be,a as te}from"../chunks/M1z6VHZC.js";import{a as T}from"../chunks/BcuCGYSa.js";import{m as Ue,a as Ye,i as qe}from"../chunks/kVvujbiQ.js";var Qe=l('<span class="w-3 h-3 border border-warning/50 border-t-warning rounded-full animate-spin"></span> Running...',1),Xe=l('<div><div class="text-lg text-text font-semibold"> </div> <div class="text-[10px] text-muted">Processed</div></div>'),Ze=l('<div><div class="text-lg text-decay font-semibold"> </div> <div class="text-[10px] text-muted">Decayed</div></div>'),et=l('<div><div class="text-lg text-synapse-glow font-semibold"> </div> <div class="text-[10px] text-muted">Embedded</div></div>'),tt=l('<div class="bg-deep/50 p-3 rounded-lg border border-subtle/10"><div class="grid grid-cols-3 gap-3 text-center"><!> <!> <!></div></div>'),st=l('<span class="w-3 h-3 border border-dream/50 border-t-dream rounded-full animate-spin"></span> Dreaming...',1),at=l('<div class="text-xs text-dim bg-dream/5 border border-dream/10 rounded p-2"> </div>'),rt=l('<div class="text-xs text-bright font-medium">Insights Discovered:</div> <!>',1),dt=l('<div class="text-xs text-dim">Connections found: <span class="text-dream-glow"> </span></div>'),it=l('<div class="text-xs text-dim">Memories replayed: <span class="text-text"> </span></div>'),ot=l('<div class="bg-deep/50 p-3 rounded-lg border border-subtle/10 space-y-2"><!> <!> <!></div>'),nt=l('<div class="flex-1 flex flex-col items-center gap-1"><div class="text-[9px] text-muted"> </div> <div class="w-full rounded-t transition-all duration-500"></div> <div class="text-[9px] text-muted"></div></div>'),vt=l('<div class="flex items-end gap-1 h-32"></div>'),lt=l('<section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-recall">◫</span> Retention Distribution</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg"><!></div></section>'),ct=l('<div class="flex items-center gap-2 py-1"><kbd class="px-1.5 py-0.5 bg-deep rounded text-[10px] font-mono text-muted min-w-[2rem] text-center"> </kbd> <span class="text-dim"> </span></div>'),xt=l(`<div class="p-6 max-w-4xl mx-auto space-y-8"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Settings & System</h1> <button class="text-xs text-dim hover:text-text transition">Refresh</button></div> <div class="grid grid-cols-2 md:grid-cols-4 gap-3"><div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-bright font-bold"> </div> <div class="text-xs text-dim mt-1">Memories</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl font-bold"> </div> <div class="text-xs text-dim mt-1">Avg Retention</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-bright font-bold flex items-center justify-center gap-2"><div></div> <span class="text-sm"> </span></div> <div class="text-xs text-dim mt-1">WebSocket</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-synapse-glow font-bold">v2.0</div> <div class="text-xs text-dim mt-1">Vestige</div></div></div> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-dream">◈</span> Cognitive Operations</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">FSRS-6 Consolidation</div> <div class="text-xs text-dim">Apply spaced-repetition decay, regenerate embeddings, run maintenance</div></div> <button class="px-4 py-2 bg-warning/20 border border-warning/40 text-warning text-sm rounded-lg hover:bg-warning/30 transition disabled:opacity-50 flex items-center gap-2"><!></button></div> <!></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">Memory Dream Cycle</div> <div class="text-xs text-dim">Replay memories, discover hidden connections, synthesize insights</div></div> <button><!></button></div> <!></div></section> <!> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-synapse">⌨</span> Keyboard Shortcuts</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg"><div class="grid grid-cols-2 gap-2 text-xs"></div></div></section> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-memory">◎</span> About</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center gap-4"><div class="w-12 h-12 rounded-xl bg-gradient-to-br from-dream to-synapse flex items-center justify-center text-bright text-xl font-bold shadow-lg shadow-synapse/20">V</div> <div><div class="text-sm text-bright font-semibold">Vestige v2.0 "Cognitive Leap"</div> <div class="text-xs text-dim">Your AI's long-term memory system</div></div></div> <div class="grid grid-cols-2 gap-2 text-xs text-dim pt-2 border-t border-subtle/10"><div>29 cognitive modules</div> <div>FSRS-6 spaced repetition</div> <div>Nomic Embed v1.5 (256d)</div> <div>Jina Reranker v1 Turbo</div> <div>USearch HNSW (20x FAISS)</div> <div>Local-first, zero cloud</div></div> <div class="text-[10px] text-muted pt-1">Built with Rust + Axum + SvelteKit 2 + Svelte 5 + Three.js + Tailwind CSS 4</div></div></section></div>`);function kt(ge,_e){He(_e,!0);const ye=()=>te(Ue,"$memoryCount",N),K=()=>te(Ye,"$avgRetention",N),se=()=>te(qe,"$isConnected",N),[N,he]=Be();let E=k(!1),A=k(!1),y=k(null),b=k(null),we=k(null),$=k(null),ae=k(!0),ke=k(null);Je(()=>{O()});async function O(){m(ae,!0);try{const[a,o,c]=await Promise.all([T.stats().catch(()=>null),T.health().catch(()=>null),T.retentionDistribution().catch(()=>null)]);m(we,a,!0),m(ke,o,!0),m($,c,!0)}finally{m(ae,!1)}}async function Se(){m(E,!0),m(y,null);try{m(y,await T.consolidate(),!0),await O()}catch{}finally{m(E,!1)}}async function Ce(){m(A,!0),m(b,null);try{m(b,await T.dream(),!0),await O()}catch{}finally{m(A,!1)}}var V=xt(),z=t(V),Re=i(t(z),2);e(z);var H=i(z,2),J=t(H),re=t(J),$e=t(re,!0);e(re),_(2),e(J);var L=i(J,2),P=t(L),Ae=t(P);e(P),_(2),e(L);var de=i(L,2),ie=t(de),oe=t(ie),ne=i(oe,2),De=t(ne,!0);e(ne),e(ie),_(2),e(de),_(2),e(H);var W=i(H,2),B=i(t(W),2),U=t(B),I=i(t(U),2),Ge=t(I);{var Fe=a=>{var o=Qe();_(),v(a,o)},Me=a=>{var o=pe("Consolidate");v(a,o)};p(Ge,a=>{s(E)?a(Fe):a(Me,!1)})}e(I),e(U);var je=i(U,2);{var Te=a=>{var o=tt(),c=t(o),f=t(c);{var S=d=>{var r=Xe(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>u(x,s(y).processed)),v(d,r)};p(f,d=>{s(y).processed!==void 0&&d(S)})}var g=i(f,2);{var h=d=>{var r=Ze(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>u(x,s(y).decayed)),v(d,r)};p(g,d=>{s(y).decayed!==void 0&&d(h)})}var C=i(g,2);{var G=d=>{var r=et(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>u(x,s(y).embedded)),v(d,r)};p(C,d=>{s(y).embedded!==void 0&&d(G)})}e(c),e(o),v(a,o)};p(je,a=>{s(y)&&a(Te)})}e(B);var ve=i(B,2),Y=t(ve),D=i(t(Y),2),Ee=t(D);{var Oe=a=>{var o=st();_(),v(a,o)},Ie=a=>{var o=pe("Dream");v(a,o)};p(Ee,a=>{s(A)?a(Oe):a(Ie,!1)})}e(D),e(Y);var Ke=i(Y,2);{var Ne=a=>{var o=ot(),c=t(o);{var f=d=>{var r=rt(),n=i(Pe(r),2);Z(n,17,()=>s(b).insights,ee,(x,F)=>{var R=at(),M=t(R,!0);e(R),w(q=>u(M,q),[()=>typeof s(F)=="string"?s(F):JSON.stringify(s(F))]),v(x,R)}),v(d,r)},S=j(()=>s(b).insights&&Array.isArray(s(b).insights));p(c,d=>{s(S)&&d(f)})}var g=i(c,2);{var h=d=>{var r=dt(),n=i(t(r)),x=t(n,!0);e(n),e(r),w(()=>u(x,s(b).connections_found)),v(d,r)};p(g,d=>{s(b).connections_found!==void 0&&d(h)})}var C=i(g,2);{var G=d=>{var r=it(),n=i(t(r)),x=t(n,!0);e(n),e(r),w(()=>u(x,s(b).memories_replayed)),v(d,r)};p(C,d=>{s(b).memories_replayed!==void 0&&d(G)})}e(o),v(a,o)};p(Ke,a=>{s(b)&&a(Ne)})}e(ve),e(W);var le=i(W,2);{var Ve=a=>{var o=lt(),c=i(t(o),2),f=t(c);{var S=h=>{var C=vt();Z(C,21,()=>s($).buckets,ee,(G,d,r)=>{const n=j(()=>Math.max(...s($).buckets.map(Q=>Q.count),1)),x=j(()=>s(d).count/s(n)*100),F=j(()=>r<2?"#ef4444":r<4?"#f59e0b":r<7?"#6366f1":"#10b981");var R=nt(),M=t(R),q=t(M,!0);e(M);var ue=i(M,2),ze=i(ue,2);ze.textContent=`${r*10}%`,e(R),w(Q=>{u(q,s(d).count),fe(ue,`height: ${Q??""}%; background: ${s(F)??""}; opacity: 0.7`)},[()=>Math.max(s(x),2)]),v(G,R)}),e(C),v(h,C)},g=j(()=>s($).buckets&&Array.isArray(s($).buckets));p(f,h=>{s(g)&&h(S)})}e(c),e(o),v(a,o)};p(le,a=>{s($)&&a(Ve)})}var ce=i(le,2),xe=i(t(ce),2),me=t(xe);Z(me,20,()=>[{key:"⌘ K",desc:"Command palette"},{key:"/",desc:"Focus search"},{key:"G",desc:"Go to Graph"},{key:"M",desc:"Go to Memories"},{key:"T",desc:"Go to Timeline"},{key:"F",desc:"Go to Feed"},{key:"E",desc:"Go to Explore"},{key:"S",desc:"Go to Stats"}],ee,(a,o)=>{var c=ct(),f=t(c),S=t(f,!0);e(f);var g=i(f,2),h=t(g,!0);e(g),e(c),w(()=>{u(S,o.key),u(h,o.desc)}),v(a,c)}),e(me),e(xe),e(ce),_(2),e(V),w(a=>{u($e,ye()),fe(P,`color: ${K()>.7?"#10b981":K()>.4?"#f59e0b":"#ef4444"}`),u(Ae,`${a??""}%`),be(oe,1,`w-2.5 h-2.5 rounded-full ${se()?"bg-recall animate-pulse-glow":"bg-decay"}`),u(De,se()?"Online":"Offline"),I.disabled=s(E),D.disabled=s(A),be(D,1,`px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition disabled:opacity-50 flex items-center gap-2
${s(A)?"glow-dream animate-pulse-glow":""}`)},[()=>(K()*100).toFixed(1)]),X("click",Re,O),X("click",I,Se),X("click",D,Ce),v(ge,V),Le(),he()}We(["click"]);export{kt as component};