vestige/apps/dashboard/build/_app/immutable/nodes/17.PvQmHhRC.js
Sam Valladares c433ae8b8d chore(release): v2.0.8 "Pulse"
Bundled release: Reasoning Theater wired to the 8-stage deep_reference
cognitive pipeline, Pulse InsightToast, Memory Birth Ritual (v2.3
Terrarium), 7 new dashboard surfaces (/duplicates, /dreams, /schedule,
/importance, /activation, /contradictions, /patterns), 3D graph
brightness system with auto distance-compensation + user slider, and
contradiction-detection + primary-selection hardening in the
cross_reference tool. Intel Mac (x86_64-apple-darwin) also flows through
to the release matrix from PR #43.

Added:
- POST /api/deep_reference — HTTP surface for the 8-stage pipeline
- DeepReferenceCompleted WebSocket event (primary + supporting +
  contradicting memory IDs for downstream graph animation)
- /reasoning route, full UI + Cmd+K Ask palette
- 7 new dashboard surfaces exposing the cognitive engine
- Graph brightness slider + localStorage persistence + distance-based
  emissive compensation so nodes don't disappear into fog at zoom-out

Fixed:
- Contradiction-detection false positives: adjacent-domain memories no
  longer flagged as conflicts (NEGATION_PAIRS wildcards removed,
  shared-words floor 2 → 4, topic-sim floor 0.15 → 0.55, STAGE 5
  overlap floor 0.15 → 0.4)
- Primary-memory selection: unified composite 0.5 × relevance + 0.2 ×
  trust + 0.3 × term_presence with hard topic-term filter, closing the
  class of bug where off-topic high-trust memories won queries about
  specific subjects
- Graph default-load fallback from sort=recent to sort=connected when
  the newest memory is isolated, both backend and client

Changed:
- Reasoning page information hierarchy: chain renders first as hero,
  confidence meter + Primary Source citation footer below
- Cargo feature split: embeddings code-only + ort-download | ort-dynamic
  backends; defaults preserve identical behavior for existing consumers
- CI release-build now gates PRs too so multi-platform regressions
  surface pre-merge
2026-04-23 02:09:21 -05:00

2 lines
11 KiB
JavaScript

import"../chunks/Bzak7iHL.js";import{o as Qe}from"../chunks/CNjeV5xa.js";import{p as Xe,t as w,a as Ze,d as i,e as t,g as s,s as k,h as m,a2 as et,r as e,n as _,f as tt,u as P}from"../chunks/CvjSAYrz.js";import{d as st,a as E,s as p}from"../chunks/FzvEaXMa.js";import{i as u}from"../chunks/ciN1mm2W.js";import{e as se,i as ae}from"../chunks/DTnG8poT.js";import{a as v,f as l,t as he}from"../chunks/BsvCUYx-.js";import{s as we}from"../chunks/DPl3NjBv.js";import{s as ke}from"../chunks/Bhad70Ss.js";import{s as at,a as ie}from"../chunks/D81f-o_I.js";import{a as F}from"../chunks/DNjM5a-l.js";import{w as it,m as dt,a as rt,i as ot}from"../chunks/CtkE7HV2.js";import{f as nt}from"../chunks/Casl2yrL.js";var vt=l('<span class="w-3 h-3 border border-warning/50 border-t-warning rounded-full animate-spin"></span> Running...',1),lt=l('<div><div class="text-lg text-text font-semibold"> </div> <div class="text-[10px] text-muted">Processed</div></div>'),ct=l('<div><div class="text-lg text-decay font-semibold"> </div> <div class="text-[10px] text-muted">Decayed</div></div>'),xt=l('<div><div class="text-lg text-synapse-glow font-semibold"> </div> <div class="text-[10px] text-muted">Embedded</div></div>'),mt=l('<div class="bg-white/[0.02] p-3 rounded-lg border border-synapse/10"><div class="grid grid-cols-3 gap-3 text-center"><!> <!> <!></div></div>'),pt=l('<span class="w-3 h-3 border border-dream/50 border-t-dream rounded-full animate-spin"></span> Dreaming...',1),ut=l('<div class="text-xs text-dim bg-dream/5 border border-dream/10 rounded-lg p-2"> </div>'),ft=l('<div class="text-xs text-bright font-medium">Insights Discovered:</div> <!>',1),gt=l('<div class="text-xs text-dim">Connections found: <span class="text-dream-glow"> </span></div>'),bt=l('<div class="text-xs text-dim">Memories replayed: <span class="text-text"> </span></div>'),_t=l('<div class="bg-white/[0.02] p-3 rounded-lg border border-synapse/10 space-y-2"><!> <!> <!></div>'),yt=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>'),ht=l('<div class="flex items-end gap-1 h-32"></div>'),wt=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 glass rounded-xl"><!></div></section>'),kt=l('<div class="flex items-center gap-2 py-1"><kbd class="px-1.5 py-0.5 bg-white/[0.04] rounded text-[10px] font-mono text-muted min-w-[2rem] text-center"> </kbd> <span class="text-dim"> </span></div>'),St=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 glass rounded-xl 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 glass rounded-xl 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 glass rounded-xl 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 glass rounded-xl text-center"><div class="text-2xl text-synapse-glow font-bold">v2.1</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 glass rounded-xl space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">Pulse Toast Preview</div> <div class="text-xs text-dim">Fire a synthetic event sequence — useful for UI demos</div></div> <button class="px-4 py-2 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-xl hover:bg-synapse/30 transition flex items-center gap-2"><span>✦</span> Preview Pulse</button></div></div> <div class="p-4 glass rounded-xl space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">Birth Ritual Preview</div> <div class="text-xs text-dim">Inject a synthetic memory — switch to Graph to watch the orb fly in</div></div> <button class="px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-xl hover:bg-dream/30 transition flex items-center gap-2"><span>✺</span> Trigger Birth</button></div></div> <div class="p-4 glass rounded-xl 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-xl hover:bg-warning/30 transition disabled:opacity-50 flex items-center gap-2"><!></button></div> <!></div> <div class="p-4 glass rounded-xl 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 glass-subtle rounded-xl"><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 glass rounded-xl 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.1 "Nuclear Dashboard"</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-synapse/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 It(Se,Ce){Xe(Ce,!0);const De=()=>ie(dt,"$memoryCount",B),N=()=>ie(rt,"$avgRetention",B),de=()=>ie(ot,"$isConnected",B),[B,$e]=at(),re=["fact","concept","pattern","decision","person","place"];let K=k(0);function Re(){const a=re[s(K)%re.length];et(K),it.injectEvent({type:"MemoryCreated",data:{id:`demo-birth-${Date.now()}`,content:`Demo memory #${s(K)}${a}`,node_type:a,tags:["demo","v2.3-birth-ritual"],retention:.9}})}let T=k(!1),R=k(!1),y=k(null),f=k(null),Ae=k(null),$=k(null),oe=k(!0),Ge=k(null);Qe(()=>{O()});async function O(){m(oe,!0);try{const[a,d,c]=await Promise.all([F.stats().catch(()=>null),F.health().catch(()=>null),F.retentionDistribution().catch(()=>null)]);m(Ae,a,!0),m(Ge,d,!0),m($,c,!0)}finally{m(oe,!1)}}async function je(){m(T,!0),m(y,null);try{m(y,await F.consolidate(),!0),await O()}catch{}finally{m(T,!1)}}async function Me(){m(R,!0),m(f,null);try{m(f,await F.dream(),!0),await O()}catch{}finally{m(R,!1)}}var V=St(),q=t(V),Pe=i(t(q),2);e(q);var z=i(q,2),J=t(z),ne=t(J),Ee=t(ne,!0);e(ne),_(2),e(J);var U=i(J,2),W=t(U),Fe=t(W);e(W),_(2),e(U);var ve=i(U,2),le=t(ve),ce=t(le),xe=i(ce,2),Te=t(xe,!0);e(xe),e(le),_(2),e(ve),_(2),e(z);var Y=i(z,2),H=i(t(Y),2),me=t(H),Oe=i(t(me),2);e(me),e(H);var L=i(H,2),pe=t(L),Ie=i(t(pe),2);e(pe),e(L);var Q=i(L,2),X=t(Q),I=i(t(X),2),Ne=t(I);{var Be=a=>{var d=vt();_(),v(a,d)},Ke=a=>{var d=he("Consolidate");v(a,d)};u(Ne,a=>{s(T)?a(Be):a(Ke,!1)})}e(I),e(X);var Ve=i(X,2);{var qe=a=>{var d=mt(),c=t(d),g=t(c);{var S=o=>{var r=lt(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>p(x,s(y).nodesProcessed)),v(o,r)};u(g,o=>{s(y).nodesProcessed!==void 0&&o(S)})}var b=i(g,2);{var h=o=>{var r=ct(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>p(x,s(y).decayApplied)),v(o,r)};u(b,o=>{s(y).decayApplied!==void 0&&o(h)})}var C=i(b,2);{var G=o=>{var r=xt(),n=t(r),x=t(n,!0);e(n),_(2),e(r),w(()=>p(x,s(y).embeddingsGenerated)),v(o,r)};u(C,o=>{s(y).embeddingsGenerated!==void 0&&o(G)})}e(c),e(d),v(a,d)};u(Ve,a=>{s(y)&&a(qe)})}e(Q);var ue=i(Q,2),Z=t(ue),A=i(t(Z),2),ze=t(A);{var Je=a=>{var d=pt();_(),v(a,d)},Ue=a=>{var d=he("Dream");v(a,d)};u(ze,a=>{s(R)?a(Je):a(Ue,!1)})}e(A),e(Z);var We=i(Z,2);{var Ye=a=>{var d=_t(),c=t(d);{var g=o=>{var r=ft(),n=i(tt(r),2);se(n,17,()=>s(f).insights,ae,(x,j)=>{var D=ut(),M=t(D,!0);e(D),w(ee=>p(M,ee),[()=>typeof s(j)=="string"?s(j):JSON.stringify(s(j))]),v(x,D)}),v(o,r)},S=P(()=>s(f).insights&&Array.isArray(s(f).insights));u(c,o=>{s(S)&&o(g)})}var b=i(c,2);{var h=o=>{var r=gt(),n=i(t(r)),x=t(n,!0);e(n),e(r),w(()=>p(x,s(f).connections_found)),v(o,r)};u(b,o=>{s(f).connections_found!==void 0&&o(h)})}var C=i(b,2);{var G=o=>{var r=bt(),n=i(t(r)),x=t(n,!0);e(n),e(r),w(()=>p(x,s(f).memories_replayed)),v(o,r)};u(C,o=>{s(f).memories_replayed!==void 0&&o(G)})}e(d),v(a,d)};u(We,a=>{s(f)&&a(Ye)})}e(ue),e(Y);var fe=i(Y,2);{var He=a=>{var d=wt(),c=i(t(d),2),g=t(c);{var S=h=>{var C=ht();se(C,21,()=>s($).distribution,ae,(G,o,r)=>{const n=P(()=>Math.max(...s($).distribution.map(te=>te.count),1)),x=P(()=>s(o).count/s(n)*100),j=P(()=>r<2?"#ef4444":r<4?"#f59e0b":r<7?"#6366f1":"#10b981");var D=yt(),M=t(D),ee=t(M,!0);e(M);var ye=i(M,2),Le=i(ye,2);Le.textContent=`${r*10}%`,e(D),w(te=>{p(ee,s(o).count),ke(ye,`height: ${te??""}%; background: ${s(j)??""}; opacity: 0.7`)},[()=>Math.max(s(x),2)]),v(G,D)}),e(C),v(h,C)},b=P(()=>s($).distribution&&Array.isArray(s($).distribution));u(g,h=>{s(b)&&h(S)})}e(c),e(d),v(a,d)};u(fe,a=>{s($)&&a(He)})}var ge=i(fe,2),be=i(t(ge),2),_e=t(be);se(_e,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"}],ae,(a,d)=>{var c=kt(),g=t(c),S=t(g,!0);e(g);var b=i(g,2),h=t(b,!0);e(b),e(c),w(()=>{p(S,d.key),p(h,d.desc)}),v(a,c)}),e(_e),e(be),e(ge),_(2),e(V),w(a=>{p(Ee,De()),ke(W,`color: ${N()>.7?"#10b981":N()>.4?"#f59e0b":"#ef4444"}`),p(Fe,`${a??""}%`),we(ce,1,`w-2.5 h-2.5 rounded-full ${de()?"bg-recall animate-pulse-glow":"bg-decay"}`),p(Te,de()?"Online":"Offline"),I.disabled=s(T),A.disabled=s(R),we(A,1,`px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-xl hover:bg-dream/30 transition disabled:opacity-50 flex items-center gap-2
${s(R)?"glow-dream animate-pulse-glow":""}`)},[()=>(N()*100).toFixed(1)]),E("click",Pe,O),E("click",Oe,function(...a){var d;(d=nt)==null||d.apply(this,a)}),E("click",Ie,Re),E("click",I,je),E("click",A,Me),v(Se,V),Ze(),$e()}st(["click"]);export{It as component};