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>
This commit is contained in:
Sam Valladares 2026-02-22 03:07:25 -06:00
parent 26cee040a5
commit c2d28f3433
321 changed files with 32695 additions and 4727 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{b as T,N as o,W as b,E as h,X as p,Y as A,Z as E,_ as R,$ as g,a0 as l}from"./DleE0ac1.js";import{B as v}from"./BolYP48w.js";function S(t,_,u=!1){o&&b();var n=new v(t),c=u?h:0;function i(a,r){if(o){const e=p(t);var s;if(e===A?s=0:e===E?s=!1:s=parseInt(e.substring(1)),a!==s){var f=R();g(f),n.anchor=f,l(!1),n.ensure(a,r),l(!0);return}}n.ensure(a,r)}T(()=>{var a=!1;_((r,s=0)=>{a=!0,i(s,r)}),a||i(!1,null)},c)}export{S as i};

View file

@ -0,0 +1 @@
import{t as l}from"./BsRos8Kb.js";import{N as e}from"./DleE0ac1.js";function u(s,c,r,f,p,i){var a=s.__className;if(e||a!==r||a===void 0){var t=l(r);(!e||t!==s.getAttribute("class"))&&(t==null?s.removeAttribute("class"):s.className=t),s.__className=r}return i}export{u as s};

View file

@ -0,0 +1,2 @@
φg<CF86>%ΡΝ
ΕΊ7hέι8ΚέΎ¶ τ<EFBFBD>ΦZΧ(ΑΫ<>τd!><3E>cF5΅ξ+κ”καΥγ¤ΞΡ™Ήφ,ήQ/R¨ΗKΡ<,[ιt<CEB9>E…χέe8oα*Ό„ΫΒS0<1E>·+wωϋM5ΰ€Ξυ<CE9E>²gΑΑ½yEWγ l|pF<70>ύxέσ Q­Βν¶@+0Φ=!^HΕνί}ϋ_Ύ2΄»zo{ω

View file

@ -0,0 +1 @@
const n="/api";async function t(e,o){const i=await fetch(`${n}${e}`,{headers:{"Content-Type":"application/json"},...o});if(!i.ok)throw new Error(`API ${i.status}: ${i.statusText}`);return i.json()}const s={memories:{list:e=>{const o=e?"?"+new URLSearchParams(e).toString():"";return t(`/memories${o}`)},get:e=>t(`/memories/${e}`),delete:e=>t(`/memories/${e}`,{method:"DELETE"}),promote:e=>t(`/memories/${e}/promote`,{method:"POST"}),demote:e=>t(`/memories/${e}/demote`,{method:"POST"})},search:(e,o=20)=>t(`/search?q=${encodeURIComponent(e)}&limit=${o}`),stats:()=>t("/stats"),health:()=>t("/health"),timeline:(e=7,o=200)=>t(`/timeline?days=${e}&limit=${o}`),graph:e=>{const o=e?"?"+new URLSearchParams(Object.entries(e).filter(([,i])=>i!==void 0).map(([i,r])=>[i,String(r)])).toString():"";return t(`/graph${o}`)},dream:()=>t("/dream",{method:"POST"}),explore:(e,o="associations",i,r=10)=>t("/explore",{method:"POST",body:JSON.stringify({from_id:e,action:o,to_id:i,limit:r})}),predict:()=>t("/predict",{method:"POST"}),importance:e=>t("/importance",{method:"POST",body:JSON.stringify({content:e})}),consolidate:()=>t("/consolidate",{method:"POST"}),retentionDistribution:()=>t("/retention-distribution"),intentions:(e="active")=>t(`/intentions?status=${e}`)};export{s as a};

View file

@ -0,0 +1 @@
var D=Object.defineProperty;var g=a=>{throw TypeError(a)};var F=(a,e,s)=>e in a?D(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var w=(a,e,s)=>F(a,typeof e!="symbol"?e+"":e,s),y=(a,e,s)=>e.has(a)||g("Cannot "+s);var t=(a,e,s)=>(y(a,e,"read from private field"),s?s.call(a):e.get(a)),l=(a,e,s)=>e.has(a)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,s),M=(a,e,s,i)=>(y(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);import{U as x,a1 as C,a2 as k,a3 as N,a4 as A,a5 as B,N as S,a6 as U,a7 as j,a8 as q}from"./DleE0ac1.js";var r,n,h,u,p,_,v;class G{constructor(e,s=!0){w(this,"anchor");l(this,r,new Map);l(this,n,new Map);l(this,h,new Map);l(this,u,new Set);l(this,p,!0);l(this,_,()=>{var e=x;if(t(this,r).has(e)){var s=t(this,r).get(e),i=t(this,n).get(s);if(i)C(i),t(this,u).delete(s);else{var c=t(this,h).get(s);c&&(t(this,n).set(s,c.effect),t(this,h).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),i=c.effect)}for(const[f,o]of t(this,r)){if(t(this,r).delete(f),f===e)break;const d=t(this,h).get(o);d&&(k(d.effect),t(this,h).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,u).has(f))continue;const d=()=>{if(Array.from(t(this,r).values()).includes(f)){var b=document.createDocumentFragment();j(o,b),b.append(A()),t(this,h).set(f,{effect:o,fragment:b})}else k(o);t(this,u).delete(f),t(this,n).delete(f)};t(this,p)||!i?(t(this,u).add(f),N(o,d,!1)):d()}}});l(this,v,e=>{t(this,r).delete(e);const s=Array.from(t(this,r).values());for(const[i,c]of t(this,h))s.includes(i)||(k(c.effect),t(this,h).delete(i))});this.anchor=e,M(this,p,s)}ensure(e,s){var i=x,c=q();if(s&&!t(this,n).has(e)&&!t(this,h).has(e))if(c){var f=document.createDocumentFragment(),o=A();f.append(o),t(this,h).set(e,{effect:B(()=>s(o)),fragment:f})}else t(this,n).set(e,B(()=>s(this.anchor)));if(t(this,r).set(i,e),c){for(const[d,m]of t(this,n))d===e?i.unskip_effect(m):i.skip_effect(m);for(const[d,m]of t(this,h))d===e?i.unskip_effect(m.effect):i.skip_effect(m.effect);i.oncommit(t(this,_)),i.ondiscard(t(this,v))}else S&&(this.anchor=U),t(this,_).call(this)}}r=new WeakMap,n=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,_=new WeakMap,v=new WeakMap;export{G as B};

View file

@ -0,0 +1 @@
import{a4 as O,b as fe,an as ne,N as D,$ as L,ao as ie,W as le,g as G,X as ue,Z as se,_ as J,a0 as q,a6 as F,ap as oe,aq as te,ar as P,U as ve,as as T,a5 as y,at as de,a8 as ce,z as pe,Q as _e,au as V,av as he,aw as ge,K as Ee,ax as j,ay as me,a1 as re,a3 as ae,az as B,F as Te,aA as Ae,aB as Ce,aC as we,a2 as Ne,aD as Se}from"./DleE0ac1.js";function De(e,r){return r}function Ie(e,r,l){for(var t=[],g=r.length,s,u=r.length,c=0;c<g;c++){let E=r[c];ae(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;U(V(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var i=t.length===0&&l!==null;if(i){var v=l,a=v.parentNode;we(a),a.append(v),e.items.clear()}U(r,!i)}else s={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function U(e,r=!0){for(var l=0;l<e.length;l++)Ne(e[l],r)}var ee;function He(e,r,l,t,g,s=null){var u=e,c=new Map,i=(r&ne)!==0;if(i){var v=e;u=D?L(ie(v)):v.appendChild(O())}D&&le();var a=null,E=pe(()=>{var f=l();return _e(f)?f:f==null?[]:V(f)}),o,d=!0;function C(){n.fallback=a,xe(n,o,u,r,t),a!==null&&(o.length===0?(a.f&T)===0?re(a):(a.f^=T,M(a,null,u)):ae(a,()=>{a=null}))}var S=fe(()=>{o=G(E);var f=o.length;let I=!1;if(D){var x=ue(u)===se;x!==(f===0)&&(u=J(),L(u),q(!1),I=!0)}for(var _=new Set,w=ve,R=ce(),p=0;p<f;p+=1){D&&F.nodeType===oe&&F.data===te&&(u=F,I=!0,q(!1));var N=o[p],b=t(N,p),h=d?null:c.get(b);h?(h.v&&P(h.v,N),h.i&&P(h.i,p),R&&w.unskip_effect(h.e)):(h=Re(c,d?u:ee??(ee=O()),N,b,p,g,r,l),d||(h.e.f|=T),c.set(b,h)),_.add(b)}if(f===0&&s&&!a&&(d?a=y(()=>s(u)):(a=y(()=>s(ee??(ee=O()))),a.f|=T)),f>_.size&&de(),D&&f>0&&L(J()),!d)if(R){for(const[k,z]of c)_.has(k)||w.skip_effect(z.e);w.oncommit(C),w.ondiscard(()=>{})}else C();I&&q(!0),G(E)}),n={effect:S,items:c,outrogroups:null,fallback:a};d=!1,D&&(u=F)}function H(e){for(;e!==null&&(e.f&Ae)===0;)e=e.next;return e}function xe(e,r,l,t,g){var h,k,z,X,Y,K,Q,W,Z;var s=(t&Ce)!==0,u=r.length,c=e.items,i=H(e.effect.first),v,a=null,E,o=[],d=[],C,S,n,f;if(s)for(f=0;f<u;f+=1)C=r[f],S=g(C,f),n=c.get(S).e,(n.f&T)===0&&((k=(h=n.nodes)==null?void 0:h.a)==null||k.measure(),(E??(E=new Set)).add(n));for(f=0;f<u;f+=1){if(C=r[f],S=g(C,f),n=c.get(S).e,e.outrogroups!==null)for(const m of e.outrogroups)m.pending.delete(n),m.done.delete(n);if((n.f&T)!==0)if(n.f^=T,n===i)M(n,null,l);else{var I=a?a.next:i;n===e.effect.last&&(e.effect.last=n.prev),n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),A(e,a,n),A(e,n,I),M(n,I,l),a=n,o=[],d=[],i=H(a.next);continue}if((n.f&B)!==0&&(re(n),s&&((X=(z=n.nodes)==null?void 0:z.a)==null||X.unfix(),(E??(E=new Set)).delete(n))),n!==i){if(v!==void 0&&v.has(n)){if(o.length<d.length){var x=d[0],_;a=x.prev;var w=o[0],R=o[o.length-1];for(_=0;_<o.length;_+=1)M(o[_],x,l);for(_=0;_<d.length;_+=1)v.delete(d[_]);A(e,w.prev,R.next),A(e,a,w),A(e,R,x),i=x,a=R,f-=1,o=[],d=[]}else v.delete(n),M(n,i,l),A(e,n.prev,n.next),A(e,n,a===null?e.effect.first:a.next),A(e,a,n),a=n;continue}for(o=[],d=[];i!==null&&i!==n;)(v??(v=new Set)).add(i),d.push(i),i=H(i.next);if(i===null)continue}(n.f&T)===0&&o.push(n),a=n,i=H(n.next)}if(e.outrogroups!==null){for(const m of e.outrogroups)m.pending.size===0&&(U(V(m.done)),(Y=e.outrogroups)==null||Y.delete(m));e.outrogroups.size===0&&(e.outrogroups=null)}if(i!==null||v!==void 0){var p=[];if(v!==void 0)for(n of v)(n.f&B)===0&&p.push(n);for(;i!==null;)(i.f&B)===0&&i!==e.fallback&&p.push(i),i=H(i.next);var N=p.length;if(N>0){var b=(t&ne)!==0&&u===0?l:null;if(s){for(f=0;f<N;f+=1)(Q=(K=p[f].nodes)==null?void 0:K.a)==null||Q.measure();for(f=0;f<N;f+=1)(Z=(W=p[f].nodes)==null?void 0:W.a)==null||Z.fix()}Ie(e,p,b)}}s&&Te(()=>{var m,$;if(E!==void 0)for(n of E)($=(m=n.nodes)==null?void 0:m.a)==null||$.apply()})}function Re(e,r,l,t,g,s,u,c){var i=(u&he)!==0?(u&ge)===0?Ee(l,!1,!1):j(l):null,v=(u&me)!==0?j(g):null;return{v:i,i:v,e:y(()=>(s(r,i??l,v??g,c),()=>{e.delete(t)}))}}function M(e,r,l){if(e.nodes)for(var t=e.nodes.start,g=e.nodes.end,s=r&&(r.f&T)===0?r.nodes.start:l;t!==null;){var u=Se(t);if(s.before(t),t===g)return;t=u}}function A(e,r,l){r===null?e.effect.first=l:r.next=l,l===null?e.effect.last=r:l.prev=r}function Me(e,r,l){var t=e==null?"":""+e;return t===""?null:t}function ke(e,r){return e==null?null:String(e)}export{ke as a,He as e,De as i,Me as t};

View file

@ -0,0 +1 @@
const e={fact:"#3b82f6",concept:"#8b5cf6",event:"#f59e0b",person:"#10b981",place:"#06b6d4",note:"#6b7280",pattern:"#ec4899",decision:"#ef4444"},o={MemoryCreated:"#10b981",MemoryUpdated:"#3b82f6",MemoryDeleted:"#ef4444",SearchPerformed:"#6366f1",DreamStarted:"#8b5cf6",DreamCompleted:"#a855f7",ConsolidationStarted:"#f59e0b",ConsolidationCompleted:"#f97316",ConnectionDiscovered:"#06b6d4",ImportanceScored:"#ec4899",Heartbeat:"#6b7280"};export{o as E,e as N};

View file

@ -0,0 +1 @@
import{b as p,E as t}from"./DleE0ac1.js";import{B as c}from"./BolYP48w.js";function E(r,s,...a){var e=new c(r);p(()=>{const n=s()??null;e.ensure(n,n&&(o=>n(o,...a)))},t)}export{E as s};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{N as d,F as k,af as S,ag as y,ah as A,ai as m,aj as E,ak as b,O as M,al as N,q as g,C as L,U as t,V as T}from"./DleE0ac1.js";const I=Symbol("is custom element"),O=Symbol("is html"),C=m?"link":"LINK";function q(a){if(d){var e=!1,r=()=>{if(!e){if(e=!0,a.hasAttribute("value")){var c=a.value;u(a,"value",null),a.value=c}if(a.hasAttribute("checked")){var s=a.checked;u(a,"checked",null),a.checked=s}}};a.__on_r=r,k(r),S()}}function u(a,e,r,c){var s=H(a);d&&(s[e]=a.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&a.nodeName===C)||s[e]!==(s[e]=r)&&(e==="loading"&&(a[y]=r),r==null?a.removeAttribute(e):typeof r!="string"&&U(a).includes(e)?a[e]=r:a.setAttribute(e,r))}function H(a){return a.__attributes??(a.__attributes={[I]:a.nodeName.includes("-"),[O]:a.namespaceURI===A})}var h=new Map;function U(a){var e=a.getAttribute("is")||a.nodeName,r=h.get(e);if(r)return r;h.set(e,r=[]);for(var c,s=a,o=Element.prototype;o!==s;){c=b(s);for(var l in c)c[l].set&&r.push(l);s=E(s)}return r}function w(a,e,r=e){var c=new WeakSet;M(a,"input",async s=>{var o=s?a.defaultValue:a.value;if(o=_(a)?i(o):o,r(o),t!==null&&c.add(t),await N(),o!==(o=e())){var l=a.selectionStart,f=a.selectionEnd,n=a.value.length;if(a.value=o??"",f!==null){var v=a.value.length;l===f&&f===n&&v>n?(a.selectionStart=v,a.selectionEnd=v):(a.selectionStart=l,a.selectionEnd=Math.min(f,v))}}}),(d&&a.defaultValue!==a.value||g(e)==null&&a.value)&&(r(_(a)?i(a.value):a.value),t!==null&&c.add(t)),L(()=>{var s=e();if(a===document.activeElement){var o=T??t;if(c.has(o))return}_(a)&&s===i(a.value)||a.type==="date"&&!s&&!a.value||s!==a.value&&(a.value=s??"")})}function _(a){var e=a.type;return e==="number"||e==="range"}function i(a){return a===""?null:+a}export{w as b,q as r,u as s};

View file

@ -0,0 +1 @@
import{a9 as d,aa as g,H as l,q as b,ab as i,ac as m,g as p,ad as v,y,ae as h}from"./DleE0ac1.js";function x(t=!1){const a=d,e=a.l.u;if(!e)return;let f=()=>v(a.s);if(t){let n=0,s={};const _=y(()=>{let c=!1;const r=a.s;for(const o in r)r[o]!==s[o]&&(s[o]=r[o],c=!0);return c&&n++,n});f=()=>p(_)}e.b.length&&g(()=>{u(a,f),i(e.b)}),l(()=>{const n=b(()=>e.m.map(m));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&l(()=>{u(a,f),i(e.a)})}function u(t,a){if(t.l.s)for(const e of t.l.s)p(e);a()}h();export{x as i};

View file

@ -0,0 +1 @@
import{k as L,l as D,P as T,g as P,h as b,s as B,m as Y,n as h,D as x,o as M,q as N,v as U,w as q,x as w,y as z,z as $,A as y,S as C,L as G}from"./DleE0ac1.js";import{c as Z}from"./M1z6VHZC.js";function H(r,a,t,d){var o;var f=!U||(t&q)!==0,v=(t&M)!==0,E=(t&y)!==0,n=d,S=!0,g=()=>(S&&(S=!1,n=E?N(d):d),n),u;if(v){var O=C in r||G in r;u=((o=L(r,a))==null?void 0:o.set)??(O&&a in r?e=>r[a]=e:void 0)}var _,I=!1;v?[_,I]=Z(()=>r[a]):_=r[a],_===void 0&&d!==void 0&&(_=g(),u&&(f&&D(),u(_)));var i;if(f?i=()=>{var e=r[a];return e===void 0?g():(S=!0,e)}:i=()=>{var e=r[a];return e!==void 0&&(n=void 0),e===void 0?n:e},f&&(t&T)===0)return i;if(u){var R=r.$$legacy;return(function(e,l){return arguments.length>0?((!f||!l||R||I)&&u(l?i():e),e):i()})}var c=!1,s=((t&w)!==0?z:$)(()=>(c=!1,i()));v&&P(s);var m=h;return(function(e,l){if(arguments.length>0){const A=l?P(s):f&&v?b(e):e;return B(s,A),c=!0,n!==void 0&&(n=A),e}return Y&&c||(m.f&x)!==0?s.v:P(s)})}export{H as p};

View file

@ -0,0 +1 @@
import{B as S,C as h,q as k,F as q,S as B}from"./DleE0ac1.js";function t(r,i){return r===i||(r==null?void 0:r[B])===i}function x(r={},i,a,T){return S(()=>{var f,s;return h(()=>{f=s,s=[],k(()=>{r!==a(...s)&&(i(r,...s),f&&t(a(...f),r)&&i(null,...f))})}),()=>{q(()=>{s&&t(a(...s),r)&&i(null,...s)})}}),r}export{x as b};

View file

@ -0,0 +1 @@
import{a as y}from"./BsRos8Kb.js";import{N as r}from"./DleE0ac1.js";function a(t,e,f,i){var l=t.__style;if(r||l!==e){var s=y(e);(!r||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}return i}export{a as s};

View file

@ -0,0 +1 @@
import{O as s,B as o,I as c,Q as b,R as m,T as h,U as v,V as y}from"./DleE0ac1.js";function _(e,r,f=!1){if(e.multiple){if(r==null)return;if(!b(r))return m();for(var a of e.options)a.selected=r.includes(i(a));return}for(a of e.options){var t=i(a);if(h(t,r)){a.selected=!0;return}}(!f||r!==void 0)&&(e.selectedIndex=-1)}function q(e){var r=new MutationObserver(()=>{_(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),c(()=>{r.disconnect()})}function p(e,r,f=r){var a=new WeakSet,t=!0;s(e,"change",u=>{var l=u?"[selected]":":checked",n;if(e.multiple)n=[].map.call(e.querySelectorAll(l),i);else{var d=e.querySelector(l)??e.querySelector("option:not([disabled])");n=d&&i(d)}f(n),v!==null&&a.add(v)}),o(()=>{var u=r();if(e===document.activeElement){var l=y??v;if(a.has(l))return}if(_(e,u,t),t&&u===void 0){var n=e.querySelector(":checked");n!==null&&(u=i(n),f(u))}e.__value=u,t=!1}),q(e)}function i(e){return"__value"in e?e.__value:e.value}export{p as b};

View file

@ -0,0 +1 @@
import{H as u,a9 as t,v as a,q as o}from"./DleE0ac1.js";function c(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function l(e){t===null&&c(),a&&t.l!==null?i(t).m.push(e):u(()=>{const n=o(e);if(typeof n=="function")return n})}function f(e){t===null&&c(),l(()=>()=>o(e))}function i(e){var n=e.l;return n.u??(n.u={a:[],b:[],m:[]})}export{f as a,l as o};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{J as b,q,am as w,ab as x}from"./DleE0ac1.js";function _(e,t,n){if(e==null)return t(void 0),n&&n(void 0),b;const r=q(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const f=[];function z(e,t){return{subscribe:A(e,t).subscribe}}function A(e,t=b){let n=null;const r=new Set;function i(u){if(w(e,u)&&(e=u,n)){const o=!f.length;for(const s of r)s[1](),f.push(s,e);if(o){for(let s=0;s<f.length;s+=2)f[s][0](f[s+1]);f.length=0}}}function a(u){i(u(e))}function l(u,o=b){const s=[u,o];return r.add(s),r.size===1&&(n=t(i,a)||b),u(e),()=>{r.delete(s),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:l}}function B(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=t.length<2;return z(n,(l,u)=>{let o=!1;const s=[];let d=0,p=b;const y=()=>{if(d)return;p();const c=t(r?s[0]:s,l,u);a?l(c):p=typeof c=="function"?c:b},h=i.map((c,g)=>_(c,m=>{s[g]=m,d&=~(1<<g),o&&y()},()=>{d|=1<<g}));return o=!0,y(),function(){x(h),p(),o=!1}})}function E(e){let t;return _(e,n=>t=n)(),t}export{B as d,E as g,_ as s,A as w};

View file

@ -0,0 +1 @@
import{s as c,g as l}from"./DrTsYth1.js";import{I as o,J as a,K as b,g as p,s as d,M as g}from"./DleE0ac1.js";let s=!1,i=Symbol();function y(e,n,r){const u=r[n]??(r[n]={store:null,source:b(void 0),unsubscribe:a});if(u.store!==e&&!(i in r))if(u.unsubscribe(),u.store=e??null,e==null)u.source.v=void 0,u.unsubscribe=a;else{var t=!0;u.unsubscribe=c(e,f=>{t?u.source.v=f:d(u.source,f)}),t=!1}return e&&i in r?l(e):p(u.source)}function m(){const e={};function n(){o(()=>{for(var r in e)e[r].unsubscribe();g(e,i,{enumerable:!1,value:!0})})}return[e,n]}function I(e){var n=s;try{return s=!1,[e(),s]}finally{s=n}}export{y as a,I as c,m as s};

View file

@ -0,0 +1 @@
import{d as l,w as S}from"./DrTsYth1.js";const y=200;function H(){const{subscribe:n,set:c,update:e}=S({connected:!1,events:[],lastHeartbeat:null,error:null});let t=null,a=null,d=0;function m(r){const u=r||(window.location.port==="5173"?`ws://${window.location.hostname}:3927/ws`:`ws://${window.location.host}/ws`);if((t==null?void 0:t.readyState)!==WebSocket.OPEN)try{t=new WebSocket(u),t.onopen=()=>{d=0,e(o=>({...o,connected:!0,error:null}))},t.onmessage=o=>{try{const s=JSON.parse(o.data);e(b=>{if(s.type==="Heartbeat")return{...b,lastHeartbeat:s};const p=[s,...b.events].slice(0,y);return{...b,events:p}})}catch{}},t.onclose=()=>{e(o=>({...o,connected:!1})),f(u)},t.onerror=()=>{e(o=>({...o,error:"WebSocket connection failed"}))}}catch(o){e(s=>({...s,error:String(o)}))}}function f(r){a&&clearTimeout(a);const u=Math.min(1e3*2**d,3e4);d++,a=setTimeout(()=>m(r),u)}function w(){a&&clearTimeout(a),t==null||t.close(),t=null,c({connected:!1,events:[],lastHeartbeat:null,error:null})}function v(){e(r=>({...r,events:[]}))}return{subscribe:n,connect:m,disconnect:w,clearEvents:v}}const i=H(),k=l(i,n=>n.connected),T=l(i,n=>n.events);l(i,n=>n.lastHeartbeat);const g=l(i,n=>{var c,e;return((e=(c=n.lastHeartbeat)==null?void 0:c.data)==null?void 0:e.memory_count)??0}),E=l(i,n=>{var c,e;return((e=(c=n.lastHeartbeat)==null?void 0:c.data)==null?void 0:e.avg_retention)??0});export{E as a,T as e,k as i,g as m,i as w};

View file

@ -0,0 +1,5 @@
@œ…±íLk<>j©Ø0j¼6súßç•f$­²OþÔr¼]t Í8Ó>ÂXwƒ°;b[Ÿ'©²Ðþÿ{ç <0A>/”`ŠÝ7{{Xš~ÀÖ õƒaN¬9“oE<6F>´7Qan(“Ì%#š<><C5A1><EFBFBD>_ÂO©jÝÔ\þÝÜ¥¦°•óÉ÷ÚmSfèA„(](·PWäÄëêI×ùŽû°nìRÕAýùMÝÄO³BÆ¢ÒŠÂ<C5A0>ÆÛüˆf$>ñ|QgÛÉàC½g—L¸^­ WJÕ»ƒÌœz÷x?ÍßÌôgn„tˆ „£hÔû§{Ç­…ÿtbeLƒ<4C>ÈžÛ¥<Ÿ<>vÚóʬ`ƒùUúh7¯¾tñ5|½ž+™%Q90AòÊV¤pÌ€|Jn“€å3J)KØu·á1aÌK¹4°=¢*„ÿâ£UtF#<23>óYèwÀ)¹#hdðS4Tm¯œ‹‹ü'ÿùÓQµúõøoÙkÓM ”ãÔŒÇ sˆíź#]m¤:0é îs<C3AE>,
]ŠdÅ.ùnq#:ÿ,f:¡£ &Ieªâu¶²­­q/
¡Ut2çã~»»ãöE˜²Ù¤Œ-5)tƒ&XüÜì4$¤ÐjåD@Òý8
㩬Õ8…þ 뎺ÔsB[µýÒ]zL³3ñšfÔjõmn÷4F@¾÷ù !<21> OŸUª¹p±'R© MPuó¥èj»Y”aö$¢b ç«a|êBå5Í¢†i2«ý5<?oG¤ÛŠr³i÷·/æäê22[y·LFON¡¡ƒéS72¦~ò»
œÑ¬

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{aE as p,a4 as u,ao as l,aF as E,n as c,aG as g,aH as w,N as d,a6 as s,aI as N,W as y,aJ as M,$ as x,aK as A}from"./DleE0ac1.js";var f;const i=((f=globalThis==null?void 0:globalThis.window)==null?void 0:f.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function L(t){return(i==null?void 0:i.createHTML(t))??t}function b(t){var r=p("template");return r.innerHTML=L(t.replaceAll("<!>","<!---->")),r.content}function a(t,r){var e=c;e.nodes===null&&(e.nodes={start:t,end:r,a:null,t:null})}function P(t,r){var e=(r&g)!==0,m=(r&w)!==0,n,v=!t.startsWith("<!>");return()=>{if(d)return a(s,null),s;n===void 0&&(n=b(v?t:"<!>"+t),e||(n=l(n)));var o=m||E?document.importNode(n,!0):n.cloneNode(!0);if(e){var T=l(o),h=o.lastChild;a(T,h)}else a(o,o);return o}}function R(t=""){if(!d){var r=u(t+"");return a(r,r),r}var e=s;return e.nodeType!==M?(e.before(e=u()),x(e)):A(e),a(e,e),e}function C(){if(d)return a(s,null),s;var t=document.createDocumentFragment(),r=document.createComment(""),e=u();return t.append(r,e),a(r,e),t}function H(t,r){if(d){var e=c;((e.f&N)===0||e.nodes.end===null)&&(e.nodes.end=s),y();return}t!==null&&t.before(r)}const I="5";var _;typeof window<"u"&&((_=window.__svelte??(window.__svelte={})).v??(_.v=new Set)).add(I);export{H as a,a as b,C as c,P as f,R as t};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{l as o,a as r}from"../chunks/rHGvVkdq.js";export{o as load_css,r as start};

View file

@ -0,0 +1,2 @@
)€import{l as o,a as r}from"../chunks/rHGvVkdq.js";export{o as load_css,r as start};


File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{a as h,f as g}from"../chunks/wmwKEafM.js";import{i as l}from"../chunks/CtRgAcWZ.js";import{p as v,f as d,t as _,a as x,c as s,r as o,e as $}from"../chunks/DleE0ac1.js";import{s as p}from"../chunks/8PSwG_AU.js";import{s as k,p as m}from"../chunks/rHGvVkdq.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const f=b;var E=g("<h1> </h1> <p> </p>",1);function A(i,c){v(c,!1),l();var t=E(),r=d(t),n=s(r,!0);o(r);var a=$(r,2),u=s(a,!0);o(a),_(()=>{var e;p(n,f.status),p(u,(e=f.error)==null?void 0:e.message)}),h(i,t),x()}export{A as component};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{a as l,f as v}from"../chunks/wmwKEafM.js";import{o as pe}from"../chunks/DZf5toYK.js";import{p as ce,d as b,h as me,g as e,a as ue,e as r,c as a,s as c,r as t,t as g}from"../chunks/DleE0ac1.js";import{d as _e,a as K,s as m}from"../chunks/8PSwG_AU.js";import{i as P}from"../chunks/BHs8FnOA.js";import{e as h,i as R}from"../chunks/BsRos8Kb.js";import{s as Q}from"../chunks/D6n3ggvw.js";import{b as fe}from"../chunks/DYdHPHRa.js";import{a as xe}from"../chunks/BcuCGYSa.js";import{N as U}from"../chunks/CHfZNXj4.js";var be=v('<div class="h-16 bg-surface/50 rounded-lg animate-pulse"></div>'),ge=v('<div class="space-y-4"></div>'),he=v('<div class="text-center py-20 text-dim"><p>No memories in the selected time range.</p></div>'),ye=v('<div class="w-2 h-2 rounded-full"></div>'),we=v('<span class="text-xs text-muted"> </span>'),ke=v('<div class="flex items-start gap-2 text-sm"><div class="w-2 h-2 mt-1.5 rounded-full flex-shrink-0"></div> <div class="flex-1 min-w-0"><span class="text-dim line-clamp-1"> </span></div> <span class="text-xs text-muted flex-shrink-0"> </span></div>'),Te=v('<div class="mt-3 pt-3 border-t border-subtle/20 space-y-2"></div>'),je=v('<div class="relative pl-14"><div class="absolute left-4 top-3 w-5 h-5 rounded-full border-2 border-synapse bg-abyss flex items-center justify-center"><div class="w-2 h-2 rounded-full bg-synapse"></div></div> <button class="w-full text-left p-4 bg-surface/40 border border-subtle/20 rounded-lg hover:border-synapse/30 transition-all"><div class="flex items-center justify-between"><div><span class="text-sm text-bright font-medium"> </span> <span class="text-xs text-dim ml-2"> </span></div> <div class="flex gap-1"><!> <!></div></div> <!></button></div>'),Ne=v('<div class="relative"><div class="absolute left-6 top-0 bottom-0 w-px bg-subtle/30"></div> <div class="space-y-4"></div></div>'),Oe=v('<div class="p-6 max-w-4xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Timeline</h1> <select class="px-3 py-2 bg-surface border border-subtle/40 rounded-lg text-dim text-sm"><option>7 days</option><option>14 days</option><option>30 days</option><option>90 days</option></select></div> <!></div>');function Re(V,W){ce(W,!0);let u=b(me([])),y=b(!0),w=b(14),k=b(null);pe(()=>Y());async function Y(){c(y,!0);try{const s=await xe.timeline(e(w),500);c(u,s.timeline,!0)}catch{c(u,[],!0)}finally{c(y,!1)}}var T=Oe(),j=a(T),_=r(a(j),2),N=a(_);N.value=N.__value=7;var O=r(N);O.value=O.__value=14;var S=r(O);S.value=S.__value=30;var q=r(S);q.value=q.__value=90,t(_),t(j);var X=r(j,2);{var Z=s=>{var d=ge();h(d,20,()=>Array(7),R,(f,x)=>{var i=be();l(f,i)}),t(d),l(s,d)},ee=s=>{var d=he();l(s,d)},te=s=>{var d=Ne(),f=r(a(d),2);h(f,21,()=>e(u),x=>x.date,(x,i)=>{var D=je(),E=r(a(D),2),$=a(E),A=a($),C=a(A),ae=a(C,!0);t(C);var z=r(C,2),se=a(z);t(z),t(A);var B=r(A,2),G=a(B);h(G,17,()=>e(i).memories.slice(0,10),R,(n,o)=>{var p=ye();g(()=>Q(p,`background: ${(U[e(o).nodeType]||"#6b7280")??""}; opacity: ${.3+e(o).retentionStrength*.7}`)),l(n,p)});var re=r(G,2);{var ie=n=>{var o=we(),p=a(o);t(o),g(()=>m(p,`+${e(i).memories.length-10}`)),l(n,o)};P(re,n=>{e(i).memories.length>10&&n(ie)})}t(B),t($);var oe=r($,2);{var le=n=>{var o=Te();h(o,21,()=>e(i).memories,R,(p,F)=>{var L=ke(),H=a(L),M=r(H,2),I=a(M),ve=a(I,!0);t(I),t(M);var J=r(M,2),de=a(J);t(J),t(L),g(ne=>{Q(H,`background: ${(U[e(F).nodeType]||"#6b7280")??""}`),m(ve,e(F).content),m(de,`${ne??""}%`)},[()=>(e(F).retentionStrength*100).toFixed(0)]),l(p,L)}),t(o),l(n,o)};P(oe,n=>{e(k)===e(i).date&&n(le)})}t(E),t(D),g(()=>{m(ae,e(i).date),m(se,`${e(i).count??""} memories`)}),K("click",E,()=>c(k,e(k)===e(i).date?null:e(i).date,!0)),l(x,D)}),t(f),t(d),l(s,d)};P(X,s=>{e(y)?s(Z):e(u).length===0?s(ee,1):s(te,!1)})}t(T),K("change",_,Y),fe(_,()=>e(w),s=>c(w,s)),l(V,T),ue()}_e(["change","click"]);export{Re as component};

View file

@ -0,0 +1 @@
import{c as m,a as n}from"../chunks/wmwKEafM.js";import{f as p}from"../chunks/DleE0ac1.js";import{s as e}from"../chunks/CVDMn5X_.js";function c(r,a){var o=m(),t=p(o);e(t,()=>a.children),n(r,o)}export{c as component};

View file

@ -0,0 +1,3 @@
import{a as u,f as m}from"../chunks/wmwKEafM.js";import{o as xe}from"../chunks/DZf5toYK.js";import{p as ge,t as g,a as fe,s as n,c as t,d as h,g as e,e as i,r as a}from"../chunks/DleE0ac1.js";import{d as be,a as D,s as d}from"../chunks/8PSwG_AU.js";import{i as $}from"../chunks/BHs8FnOA.js";import{e as _e,i as he}from"../chunks/BsRos8Kb.js";import{s as ye}from"../chunks/BK028jHP.js";import{s as we}from"../chunks/D6n3ggvw.js";import{s as De,a as $e}from"../chunks/M1z6VHZC.js";import{G as ke}from"../chunks/CVZIBdRK.js";import{a as f}from"../chunks/BcuCGYSa.js";import{e as Se}from"../chunks/kVvujbiQ.js";var je=m('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4"><div class="w-16 h-16 mx-auto rounded-full border-2 border-synapse/30 border-t-synapse animate-spin"></div> <p class="text-dim text-sm">Loading memory graph...</p></div></div>'),Ce=m('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4 max-w-md px-8"><div class="text-4xl">◎</div> <h2 class="text-xl text-bright">Your Mind Awaits</h2> <p class="text-dim text-sm"> </p></div></div>'),Fe=m("<div> </div>"),Me=m('<span class="px-2 py-0.5 rounded text-xs bg-surface text-dim"> </span>'),ze=m("<div> </div>"),Ae=m('<div class="absolute right-0 top-0 h-full w-96 bg-abyss/95 backdrop-blur-xl border-l border-subtle/30 p-6 overflow-y-auto z-20"><div class="flex justify-between items-start mb-4"><h3 class="text-bright text-sm font-semibold">Memory Detail</h3> <button class="text-dim hover:text-text text-lg">×</button></div> <div class="space-y-4"><div class="flex gap-2"><span class="px-2 py-0.5 rounded text-xs bg-synapse/20 text-synapse-glow"> </span> <!></div> <div class="text-sm text-text leading-relaxed whitespace-pre-wrap"> </div> <div><div class="flex justify-between text-xs text-dim mb-1"><span>Retention</span> <span> </span></div> <div class="h-2 bg-surface rounded-full overflow-hidden"><div class="h-full rounded-full transition-all duration-500"></div></div></div> <div class="text-xs text-dim space-y-1"><div> </div> <div> </div> <!></div> <div class="flex gap-2"><button class="flex-1 px-3 py-2 rounded bg-recall/20 text-recall text-xs hover:bg-recall/30 transition">Promote</button> <button class="flex-1 px-3 py-2 rounded bg-decay/20 text-decay text-xs hover:bg-decay/30 transition">Demote</button></div></div></div>'),Ge=m('<div class="h-full relative"><!> <div class="absolute top-4 left-4 flex gap-2 z-10"><button> </button></div> <div class="absolute top-4 right-4 z-10 text-xs text-dim backdrop-blur-sm bg-abyss/60 rounded-lg px-3 py-2 border border-subtle/20"><!></div> <!></div>');function Je(B,E){ge(E,!0);const H=()=>$e(Se,"$eventFeed",J),[J,K]=De();let v=h(null),s=h(null),I=h(!0),k=h(""),x=h(!1);xe(async()=>{try{n(v,await f.graph({max_nodes:150,depth:3}),!0)}catch{n(k,"No memories yet. Start using Vestige to see your memory graph.")}finally{n(I,!1)}});async function O(){n(x,!0);try{const r=await f.dream();n(v,await f.graph({max_nodes:150,depth:3}),!0)}catch{}finally{n(x,!1)}}async function Q(r){try{n(s,await f.memories.get(r),!0)}catch{n(s,null)}}var S=Ge(),P=t(S);{var U=r=>{var o=je();u(r,o)},W=r=>{var o=Ce(),l=t(o),y=i(t(l),4),w=t(y,!0);a(y),a(l),a(o),g(()=>d(w,e(k))),u(r,o)},X=r=>{ke(r,{get nodes(){return e(v).nodes},get edges(){return e(v).edges},get centerId(){return e(v).center_id},get events(){return H()},get isDreaming(){return e(x)},onSelect:Q})};$(P,r=>{e(I)?r(U):e(k)?r(W,1):e(v)&&r(X,2)})}var j=i(P,2),b=t(j),Z=t(b,!0);a(b),a(j);var C=i(j,2),ee=t(C);{var te=r=>{var o=Fe(),l=t(o);a(o),g(()=>d(l,`${e(v).nodeCount??""} nodes / ${e(v).edgeCount??""} edges`)),u(r,o)};$(ee,r=>{e(v)&&r(te)})}a(C);var ae=i(C,2);{var re=r=>{var o=Ae(),l=t(o),y=i(t(l),2);a(l);var w=i(l,2),F=t(w),M=t(F),se=t(M,!0);a(M);var ie=i(M,2);_e(ie,17,()=>e(s).tags,he,(c,p)=>{var _=Me(),me=t(_,!0);a(_),g(()=>d(me,e(p))),u(c,_)}),a(F);var z=i(F,2),oe=t(z,!0);a(z);var A=i(z,2),G=t(A),T=i(t(G),2),de=t(T);a(T),a(G);var V=i(G,2),ve=t(V);a(V),a(A);var L=i(A,2),N=t(L),ne=t(N);a(N);var R=i(N,2),le=t(R);a(R);var ce=i(R,2);{var pe=c=>{var p=ze(),_=t(p);a(p),g(()=>d(_,`Source: ${e(s).source??""}`)),u(c,p)};$(ce,c=>{e(s).source&&c(pe)})}a(L);var Y=i(L,2),q=t(Y),ue=i(q,2);a(Y),a(w),a(o),g((c,p)=>{d(se,e(s).nodeType),d(oe,e(s).content),d(de,`${c??""}%`),we(ve,`width: ${e(s).retentionStrength*100}%; background: ${e(s).retentionStrength>.7?"#10b981":e(s).retentionStrength>.4?"#f59e0b":"#ef4444"}`),d(ne,`Created: ${p??""}`),d(le,`Reviews: ${e(s).reviewCount??0??""}`)},[()=>(e(s).retentionStrength*100).toFixed(1),()=>new Date(e(s).createdAt).toLocaleDateString()]),D("click",y,()=>n(s,null)),D("click",q,()=>e(s)&&f.memories.promote(e(s).id)),D("click",ue,()=>e(s)&&f.memories.demote(e(s).id)),u(r,o)};$(ae,r=>{e(s)&&r(re)})}a(S),g(()=>{b.disabled=e(x),ye(b,1,`px-4 py-2 rounded-lg bg-dream/20 border border-dream/40 text-dream-glow text-sm
hover:bg-dream/30 transition-all disabled:opacity-50 backdrop-blur-sm
${e(x)?"glow-dream animate-pulse-glow":""}`),d(Z,e(x)?"◎ Dreaming...":"◎ Dream")}),D("click",b,O),u(B,S),fe(),K()}be(["click"]);export{Je as component};

View file

@ -0,0 +1,6 @@
import{a as p,f as u,c as ze}from"../chunks/wmwKEafM.js";import{p as Ae,d as I,h as Pe,g as e,a as Qe,c as r,e as a,s as f,r as t,i as qe,t as y,f as ge,u as se,j as Be}from"../chunks/DleE0ac1.js";import{d as De,a as q,s as n}from"../chunks/8PSwG_AU.js";import{i as S}from"../chunks/BHs8FnOA.js";import{e as oe,i as ie}from"../chunks/BsRos8Kb.js";import{b as ne,r as ye}from"../chunks/ChQRIhGP.js";import{s as de}from"../chunks/BK028jHP.js";import{s as Ke}from"../chunks/D6n3ggvw.js";import{a as X}from"../chunks/BcuCGYSa.js";var Re=u('<button><span class="text-xl"> </span> <span class="font-medium"> </span> <span class="text-[10px] text-muted text-center"> </span></button>'),Ue=u('<div class="p-3 bg-synapse/10 border border-synapse/30 rounded-lg"><div class="text-[10px] text-synapse-glow mb-1 uppercase tracking-wider">Source</div> <p class="text-sm text-text"> </p> <div class="flex gap-2 mt-1.5 text-[10px] text-muted"><span> </span> <span> </span></div></div>'),Ve=u('<div class="p-3 bg-dream/10 border border-dream/30 rounded-lg"><div class="text-[10px] text-dream-glow mb-1 uppercase tracking-wider">Target</div> <p class="text-sm text-text"> </p> <div class="flex gap-2 mt-1.5 text-[10px] text-muted"><span> </span> <span> </span></div></div>'),Ge=u(`<div class="space-y-3"><label class="text-xs text-dim font-medium">Target Memory <span class="text-muted"> </span></label> <div class="flex gap-2"><input type="text" placeholder="Search for the target memory..." class="flex-1 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-dream/60 transition"/> <button class="px-4 py-2.5 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition">Find</button></div></div> <!>`,1),He=u('<div class="text-center py-8 text-dim"><div class="text-lg animate-pulse mb-2">◎</div> <p> </p></div>'),Je=u('<span class="px-1.5 py-0.5 bg-deep rounded"> </span>'),Le=u("<span> </span>"),We=u("<span> </span>"),Xe=u("<span> </span>"),Ye=u('<span class="text-synapse-glow"> </span>'),Ze=u('<div class="p-3 bg-surface/40 border border-subtle/20 rounded-lg flex items-start gap-3 hover:border-subtle/40 transition"><div class="w-6 h-6 rounded-full bg-synapse/15 text-synapse-glow text-xs flex items-center justify-center flex-shrink-0 mt-0.5"></div> <div class="flex-1 min-w-0"><p class="text-sm text-text line-clamp-2"> </p> <div class="flex flex-wrap gap-3 mt-1.5 text-xs text-muted"><!> <!> <!> <!> <!></div></div></div>'),et=u('<div class="space-y-4"><div class="flex items-center justify-between"><h2 class="text-sm text-bright font-semibold"> </h2></div> <div class="space-y-2"></div></div>'),tt=u('<div class="text-center py-8 text-dim"><div class="text-3xl mb-3 opacity-20"></div> <p>No connections found for this query.</p></div>'),rt=u('<div><div class="text-xs text-dim mb-1.5 capitalize"> </div> <div class="h-2 bg-deep rounded-full overflow-hidden"><div></div></div> <div class="text-xs text-muted mt-1"> </div></div>'),at=u('<div class="grid grid-cols-4 gap-3"></div>'),st=u('<div class="mt-4 p-4 bg-surface/30 border border-subtle/20 rounded-lg"><div class="flex items-center gap-3 mb-4"><span class="text-3xl text-bright font-bold"> </span> <span> </span></div> <!></div>'),ot=u(`<div class="p-6 max-w-5xl mx-auto space-y-8"><h1 class="text-xl text-bright font-semibold">Explore Connections</h1> <div class="grid grid-cols-3 gap-2"></div> <div class="space-y-3"><label class="text-xs text-dim font-medium">Source Memory</label> <div class="flex gap-2"><input type="text" placeholder="Search for a memory to explore from..." class="flex-1 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-synapse/60 transition"/> <button class="px-4 py-2.5 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition">Find</button></div></div> <!> <!> <!> <div class="pt-8 border-t border-subtle/20"><h2 class="text-lg text-bright font-semibold mb-4">Importance Scorer</h2> <p class="text-xs text-muted mb-3">4-channel neuroscience scoring: novelty, arousal, reward, attention</p> <textarea placeholder="Paste any text to score its importance..." class="w-full h-24 px-4 py-3 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted resize-none focus:outline-none focus:border-synapse/60 transition"></textarea> <button class="mt-2 px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition">Score</button> <!></div></div>`);function mt(he,we){Ae(we,!0);let V=I(""),G=I(""),F=I(null),C=I(null),B=I(Pe([])),$=I("associations"),O=I(!1),H=I(""),D=I(null);const le={associations:{icon:"",desc:"Spreading activation find related memories via graph traversal"},chains:{icon:"",desc:"Build reasoning path from source to target memory"},bridges:{icon:"",desc:"Find connecting memories between two concepts"}};async function ve(){if(e(V).trim()){f(O,!0);try{const s=await X.search(e(V),1);s.results.length>0&&(f(F,s.results[0],!0),await Y())}catch{}finally{f(O,!1)}}}async function ce(){if(e(G).trim()){f(O,!0);try{const s=await X.search(e(G),1);s.results.length>0&&(f(C,s.results[0],!0),e(F)&&await Y())}catch{}finally{f(O,!1)}}}async function Y(){if(e(F)){f(O,!0);try{const s=(e($)==="chains"||e($)==="bridges")&&e(C)?e(C).id:void 0,o=await X.explore(e(F).id,e($),s);f(B,o.results||o.nodes||o.chain||o.bridges||[],!0)}catch{f(B,[],!0)}finally{f(O,!1)}}}async function Se(){e(H).trim()&&f(D,await X.importance(e(H)),!0)}function ke(s){f($,s,!0),e(F)&&Y()}var Z=ot(),ee=a(r(Z),2);oe(ee,20,()=>["associations","chains","bridges"],ie,(s,o)=>{var d=Re(),b=r(d),h=r(b,!0);t(b);var _=a(b,2),c=r(_,!0);t(_);var i=a(_,2),g=r(i,!0);t(i),t(d),y(w=>{de(d,1,`flex flex-col items-center gap-1 p-3 rounded-lg text-sm transition
${e($)===o?"bg-synapse/15 text-synapse-glow border border-synapse/40":"bg-surface/30 text-dim border border-subtle/20 hover:border-subtle/40"}`),n(h,le[o].icon),n(c,w),n(g,le[o].desc)},[()=>o.charAt(0).toUpperCase()+o.slice(1)]),q("click",d,()=>ke(o)),p(s,d)}),t(ee);var te=a(ee,2),pe=a(r(te),2),J=r(pe);ye(J);var Fe=a(J,2);t(pe),t(te);var xe=a(te,2);{var Te=s=>{var o=Ue(),d=a(r(o),2),b=r(d,!0);t(d);var h=a(d,2),_=r(h),c=r(_,!0);t(_);var i=a(_,2),g=r(i);t(i),t(h),t(o),y((w,z)=>{n(b,w),n(c,e(F).nodeType),n(g,`${z??""}% retention`)},[()=>e(F).content.slice(0,200),()=>(e(F).retentionStrength*100).toFixed(0)]),p(s,o)};S(xe,s=>{e(F)&&s(Te)})}var ue=a(xe,2);{var $e=s=>{var o=Ge(),d=ge(o),b=r(d),h=a(r(b)),_=r(h);t(h),t(b);var c=a(b,2),i=r(c);ye(i);var g=a(i,2);t(c),t(d);var w=a(d,2);{var z=m=>{var E=Ve(),x=a(r(E),2),K=r(x,!0);t(x);var M=a(x,2),k=r(M),A=r(k,!0);t(k);var T=a(k,2),P=r(T);t(T),t(M),t(E),y((Q,j)=>{n(K,Q),n(A,e(C).nodeType),n(P,`${j??""}% retention`)},[()=>e(C).content.slice(0,200),()=>(e(C).retentionStrength*100).toFixed(0)]),p(m,E)};S(w,m=>{e(C)&&m(z)})}y(()=>n(_,`(for ${e($)??""})`)),q("keydown",i,m=>m.key==="Enter"&&ce()),ne(i,()=>e(G),m=>f(G,m)),q("click",g,ce),p(s,o)};S(ue,s=>{(e($)==="chains"||e($)==="bridges")&&s($e)})}var me=a(ue,2);{var Ee=s=>{var o=ze(),d=ge(o);{var b=c=>{var i=He(),g=a(r(i),2),w=r(g);t(g),t(i),y(()=>n(w,`Exploring ${e($)??""}...`)),p(c,i)},h=c=>{var i=et(),g=r(i),w=r(g),z=r(w);t(w),t(g);var m=a(g,2);oe(m,21,()=>e(B),ie,(E,x,K)=>{var M=Ze(),k=r(M);k.textContent=K+1;var A=a(k,2),T=r(A),P=r(T,!0);t(T);var Q=a(T,2),j=r(Q);{var L=l=>{var v=Je(),N=r(v,!0);t(v),y(()=>n(N,e(x).nodeType)),p(l,v)};S(j,l=>{e(x).nodeType&&l(L)})}var R=a(j,2);{var ae=l=>{var v=Le(),N=r(v);t(v),y(U=>n(N,`Score: ${U??""}`),[()=>Number(e(x).score).toFixed(3)]),p(l,v)};S(R,l=>{e(x).score&&l(ae)})}var W=a(R,2);{var Ie=l=>{var v=We(),N=r(v);t(v),y(U=>n(N,`Similarity: ${U??""}`),[()=>Number(e(x).similarity).toFixed(3)]),p(l,v)};S(W,l=>{e(x).similarity&&l(Ie)})}var fe=a(W,2);{var je=l=>{var v=Xe(),N=r(v);t(v),y(U=>n(N,`${U??""}% retention`),[()=>(Number(e(x).retention)*100).toFixed(0)]),p(l,v)};S(fe,l=>{e(x).retention&&l(je)})}var Ce=a(fe,2);{var Oe=l=>{var v=Ye(),N=r(v,!0);t(v),y(()=>n(N,e(x).connectionType)),p(l,v)};S(Ce,l=>{e(x).connectionType&&l(Oe)})}t(Q),t(A),t(M),y(()=>n(P,e(x).content)),p(E,M)}),t(m),t(i),y(()=>n(z,`${e(B).length??""} Connections Found`)),p(c,i)},_=c=>{var i=tt();p(c,i)};S(d,c=>{e(O)?c(b):e(B).length>0?c(h,1):c(_,!1)})}p(s,o)};S(me,s=>{e(F)&&s(Ee)})}var be=a(me,2),re=a(r(be),4);qe(re);var _e=a(re,2),Me=a(_e,2);{var Ne=s=>{const o=se(()=>e(D).channels),d=se(()=>Number(e(D).composite||e(D).compositeScore||0));var b=st(),h=r(b),_=r(h),c=r(_,!0);t(_);var i=a(_,2),g=r(i,!0);t(i),t(h);var w=a(h,2);{var z=m=>{var E=at();oe(E,21,()=>Object.entries(e(o)),ie,(x,K)=>{var M=se(()=>Be(e(K),2));let k=()=>e(M)[0],A=()=>e(M)[1];var T=rt(),P=r(T),Q=r(P,!0);t(P);var j=a(P,2),L=r(j);t(j);var R=a(j,2),ae=r(R,!0);t(R),t(T),y(W=>{n(Q,k()),de(L,1,`h-full rounded-full transition-all duration-500
${k()==="novelty"?"bg-synapse":k()==="arousal"?"bg-dream":k()==="reward"?"bg-recall":"bg-amber-400"}`),Ke(L,`width: ${A()*100}%`),n(ae,W)},[()=>A().toFixed(2)]),p(x,T)}),t(E),p(m,E)};S(w,m=>{e(o)&&m(z)})}t(b),y(m=>{n(c,m),de(i,1,`px-2 py-1 rounded text-xs ${e(d)>.6?"bg-recall/20 text-recall border border-recall/30":"bg-surface text-dim border border-subtle/30"}`),n(g,e(d)>.6?"SAVE":"SKIP")},[()=>e(d).toFixed(2)]),p(s,b)};S(Me,s=>{e(D)&&s(Ne)})}t(be),t(Z),q("keydown",J,s=>s.key==="Enter"&&ve()),ne(J,()=>e(V),s=>f(V,s)),q("click",Fe,ve),ne(re,()=>e(H),s=>f(H,s)),q("click",_e,Se),p(he,Z),Qe()}De(["click","keydown"]);export{mt as component};

View file

@ -0,0 +1,2 @@
import{a as c,f as l}from"../chunks/wmwKEafM.js";import{i as z}from"../chunks/CtRgAcWZ.js";import{p as B,t as $,a as G,e as i,c as a,r,g as o}from"../chunks/DleE0ac1.js";import{d as K,a as Q,s as m}from"../chunks/8PSwG_AU.js";import{i as D}from"../chunks/BHs8FnOA.js";import{e as X,i as Z}from"../chunks/BsRos8Kb.js";import{s as h}from"../chunks/D6n3ggvw.js";import{s as ee,a as te}from"../chunks/M1z6VHZC.js";import{w as re,e as ae}from"../chunks/kVvujbiQ.js";import{E as x}from"../chunks/CHfZNXj4.js";var se=l('<div class="text-center py-20 text-dim"><div class="text-4xl mb-4">◉</div> <p>Waiting for cognitive events...</p> <p class="text-sm text-muted mt-2">Events appear here in real-time as Vestige thinks.</p></div>'),oe=l('<span class="text-xs text-muted"> </span>'),ie=l(`<div class="flex items-start gap-3 p-3 bg-surface/40 border border-subtle/15 rounded-lg
hover:border-subtle/30 transition-all duration-200"><div class="w-6 h-6 rounded flex items-center justify-center text-xs flex-shrink-0"> </div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-0.5"><span class="text-xs font-medium"> </span> <!></div> <p class="text-sm text-dim"> </p></div></div>`),ne=l('<div class="space-y-2"></div>'),de=l('<div class="p-6 max-w-4xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Live Feed</h1> <div class="flex gap-3"><span class="text-dim text-sm"> </span> <button class="text-xs text-muted hover:text-text transition">Clear</button></div></div> <!></div>');function ye(F,M){B(M,!1);const _=()=>te(ae,"$eventFeed",k),[k,N]=ee();function P(t){return new Date(t).toLocaleTimeString()}function E(t){return{MemoryCreated:"+",MemoryUpdated:"~",MemoryDeleted:"×",MemoryPromoted:"",MemoryDemoted:"",SearchPerformed:"",DreamStarted:"",DreamProgress:"",DreamCompleted:"",ConsolidationStarted:"",ConsolidationCompleted:"",RetentionDecayed:"",ConnectionDiscovered:"",ActivationSpread:"",ImportanceScored:"",Heartbeat:""}[t]||"·"}function T(t){const e=t.data;switch(t.type){case"MemoryCreated":return`New ${e.node_type}: "${String(e.content_preview).slice(0,60)}..."`;case"SearchPerformed":return`Searched "${e.query}" → ${e.result_count} results (${e.duration_ms}ms)`;case"DreamStarted":return`Dream started with ${e.memory_count} memories`;case"DreamCompleted":return`Dream complete: ${e.connections_found} connections, ${e.insights_generated} insights (${e.duration_ms}ms)`;case"ConsolidationStarted":return"Consolidation cycle started";case"ConsolidationCompleted":return`Consolidated ${e.nodes_processed} nodes, ${e.decay_applied} decayed (${e.duration_ms}ms)`;case"ConnectionDiscovered":return`Connection: ${String(e.connection_type)} (weight: ${Number(e.weight).toFixed(2)})`;case"ImportanceScored":return`Scored ${Number(e.composite_score).toFixed(2)}: "${String(e.content_preview).slice(0,50)}..."`;case"MemoryPromoted":return`Promoted → ${(Number(e.new_retention)*100).toFixed(0)}% retention`;case"MemoryDemoted":return`Demoted → ${(Number(e.new_retention)*100).toFixed(0)}% retention`;default:return JSON.stringify(e).slice(0,100)}}z();var f=de(),g=a(f),S=i(a(g),2),y=a(S),I=a(y);r(y);var L=i(y,2);r(S),r(g);var O=i(g,2);{var j=t=>{var e=se();c(t,e)},R=t=>{var e=ne();X(e,5,_,Z,(V,s)=>{var p=ie(),v=a(p),q=a(v,!0);r(v);var C=i(v,2),b=a(C),u=a(b),A=a(u,!0);r(u);var H=i(u,2);{var J=n=>{var d=oe(),W=a(d,!0);r(d),$(Y=>m(W,Y),[()=>P(String(o(s).data.timestamp))]),c(n,d)};D(H,n=>{o(s).data.timestamp&&n(J)})}r(b);var w=i(b,2),U=a(w,!0);r(w),r(C),r(p),$((n,d)=>{h(p,`border-left: 3px solid ${(x[o(s).type]||"#6b7280")??""}`),h(v,`background: ${(x[o(s).type]||"#6b7280")??""}20; color: ${(x[o(s).type]||"#6b7280")??""}`),m(q,n),h(u,`color: ${(x[o(s).type]||"#6b7280")??""}`),m(A,o(s).type),m(U,d)},[()=>E(o(s).type),()=>T(o(s))]),c(V,p)}),r(e),c(t,e)};D(O,t=>{_().length===0?t(j):t(R,!1)})}r(f),$(()=>m(I,`${_().length??""} events`)),Q("click",L,()=>re.clearEvents()),c(F,f),G(),N()}K(["click"]);export{ye as component};

View file

@ -0,0 +1,5 @@
import{a as h,f as w}from"../chunks/wmwKEafM.js";import{o as Ue}from"../chunks/DZf5toYK.js";import{p as we,c as a,e as r,G as ke,r as t,t as S,g as e,a as De,u as ce,s as b,d as z,f as Ve}from"../chunks/DleE0ac1.js";import{s as i,d as Ye,a as M}from"../chunks/8PSwG_AU.js";import{i as O}from"../chunks/BHs8FnOA.js";import{e as pe,i as ue}from"../chunks/BsRos8Kb.js";import{s as p,b as Ze,r as He}from"../chunks/ChQRIhGP.js";import{s as Je}from"../chunks/BK028jHP.js";import{s as Se}from"../chunks/D6n3ggvw.js";import{b as Ke}from"../chunks/DYdHPHRa.js";import{s as Oe,a as We}from"../chunks/M1z6VHZC.js";import{G as Xe}from"../chunks/CVZIBdRK.js";import{p as he}from"../chunks/D-x7U94i.js";import{a as Z}from"../chunks/BcuCGYSa.js";import{e as et}from"../chunks/kVvujbiQ.js";var tt=w('<div class="flex items-center gap-1 text-[10px]"><span class="text-muted"> </span> <span> </span></div>'),at=w('<div class="space-y-2"><svg class="w-full"><line x1="4" stroke="#2a2a5e" stroke-width="0.5" stroke-dasharray="2,4"></line><line x1="4" stroke="#ef444430" stroke-width="0.5" stroke-dasharray="2,4"></line><path fill="none" stroke="#6366f1" stroke-width="2" stroke-linecap="round"></path><path fill="url(#curveGrad)" opacity="0.15"></path><circle cx="4" r="3"></circle><defs><linearGradient id="curveGrad" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#6366f1"></stop><stop offset="100%" stop-color="#6366f100"></stop></linearGradient></defs></svg> <div class="flex gap-2 flex-wrap"></div></div>');function rt(W,f){we(f,!0);let $=he(f,"width",3,240),u=he(f,"height",3,80);function E(n){return f.stability<=0?0:Math.exp(-n/f.stability)}let x=ce(()=>()=>{const n=[],_=Math.max(f.stability*3,30),m=4,j=$()-m*2,T=u()-m*2;for(let v=0;v<=50;v++){const R=v/50*_,C=E(R),U=m+v/50*j,K=m+(1-C)*T;n.push(`${v===0?"M":"L"}${U.toFixed(1)},${K.toFixed(1)}`)}return n.join(" ")}),o=ce(()=>[{label:"Now",days:0,value:f.retention},{label:"1d",days:1,value:E(1)},{label:"7d",days:7,value:E(7)},{label:"30d",days:30,value:E(30)}]);function P(n){return n>.7?"#10b981":n>.4?"#f59e0b":"#ef4444"}var A=at(),l=a(A),k=a(l),F=r(k),G=r(F),H=r(G),J=r(H);ke(),t(l);var Q=r(l,2);pe(Q,21,()=>e(o),ue,(n,_)=>{var m=tt(),j=a(m),T=a(j);t(j);var v=r(j,2),R=a(v);t(v),t(m),S((C,U)=>{i(T,`${e(_).label??""}:`),Se(v,`color: ${C??""}`),i(R,`${U??""}%`)},[()=>P(e(_).value),()=>(e(_).value*100).toFixed(0)]),h(n,m)}),t(Q),t(A),S((n,_,m)=>{p(l,"width",$()),p(l,"height",u()),p(l,"viewBox",`0 0 ${$()??""} ${u()??""}`),p(k,"y1",4+(u()-8)*.5),p(k,"x2",$()-4),p(k,"y2",4+(u()-8)*.5),p(F,"y1",4+(u()-8)*.8),p(F,"x2",$()-4),p(F,"y2",4+(u()-8)*.8),p(G,"d",n),p(H,"d",`${_??""} L${$()-4},${u()-4} L4,${u()-4} Z`),p(J,"cy",4+(1-f.retention)*(u()-8)),p(J,"fill",m)},[()=>e(x)(),()=>e(x)(),()=>P(f.retention)]),h(W,A),De()}var st=w('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4"><div class="w-16 h-16 mx-auto rounded-full border-2 border-synapse/30 border-t-synapse animate-spin"></div> <p class="text-dim text-sm">Loading memory graph...</p></div></div>'),ot=w('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4 max-w-md px-8"><div class="text-5xl opacity-30">◎</div> <h2 class="text-xl text-bright">Your Mind Awaits</h2> <p class="text-dim text-sm"> </p></div></div>'),it=w('<span> </span> <span class="mx-2 text-subtle">·</span> <span> </span> <span class="mx-2 text-subtle">·</span> <span> </span>',1),nt=w('<span class="px-2 py-0.5 rounded text-xs bg-surface text-dim"> </span>'),dt=w('<div><div class="flex justify-between text-xs text-dim mb-0.5"><span> </span> <span> </span></div> <div class="h-1.5 bg-surface rounded-full overflow-hidden"><div class="h-full rounded-full transition-all duration-500"></div></div></div>'),lt=w("<div> </div>"),vt=w(`<div class="absolute right-0 top-0 h-full w-96 bg-abyss/95 backdrop-blur-xl border-l border-subtle/30 p-6 overflow-y-auto z-20
transition-transform duration-300"><div class="flex justify-between items-start mb-4"><h3 class="text-bright text-sm font-semibold">Memory Detail</h3> <button class="text-dim hover:text-text text-lg leading-none">×</button></div> <div class="space-y-4"><div class="flex gap-2 flex-wrap"><span class="px-2 py-0.5 rounded text-xs bg-synapse/20 text-synapse-glow"> </span> <!></div> <div class="text-sm text-text leading-relaxed whitespace-pre-wrap max-h-64 overflow-y-auto"> </div> <div class="space-y-2"></div> <div><div class="text-xs text-dim mb-1 font-medium">Retention Forecast</div> <!></div> <div class="text-xs text-muted space-y-1"><div> </div> <div> </div> <!> <div> </div></div> <div class="flex gap-2 pt-2"><button class="flex-1 px-3 py-2 rounded bg-recall/20 text-recall text-xs hover:bg-recall/30 transition">↑ Promote</button> <button class="flex-1 px-3 py-2 rounded bg-decay/20 text-decay text-xs hover:bg-decay/30 transition">↓ Demote</button></div> <a href="/explore" class="block text-center px-3 py-2 rounded bg-dream/10 text-dream-glow text-xs hover:bg-dream/20 transition border border-dream/20">◬ Explore Connections</a></div></div>`),ct=w(`<div class="h-full relative"><!> <div class="absolute top-4 left-4 right-4 z-10 flex items-center gap-3"><div class="flex gap-2 flex-1 max-w-md"><input type="text" placeholder="Center graph on..." class="flex-1 px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-synapse/50 transition"/> <button class="px-3 py-2 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition backdrop-blur-sm">Focus</button></div> <div class="flex gap-2 ml-auto"><select class="px-2 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-xs"><option>50 nodes</option><option>100 nodes</option><option>150 nodes</option><option>200 nodes</option></select> <button> </button> <button class="px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-sm hover:text-text transition">↻</button></div></div> <div class="absolute bottom-4 left-4 z-10 text-xs text-dim backdrop-blur-sm bg-abyss/60 rounded-lg px-3 py-2 border border-subtle/20"><!></div> <!></div>`);function At(W,f){we(f,!0);const $=()=>We(et,"$eventFeed",u),[u,E]=Oe();let x=z(null),o=z(null),P=z(!0),A=z(""),l=z(!1),k=z(""),F=z(150);Ue(()=>G());async function G(s,d){b(P,!0),b(A,"");try{b(x,await Z.graph({max_nodes:e(F),depth:3,query:s||void 0,center_id:d||void 0}),!0)}catch{b(A,"No memories yet. Start using Vestige to populate your graph.")}finally{b(P,!1)}}async function H(){b(l,!0);try{await Z.dream(),await G()}catch{}finally{b(l,!1)}}async function J(s){try{b(o,await Z.memories.get(s),!0)}catch{b(o,null)}}function Q(){e(k).trim()&&G(e(k))}var n=ct(),_=a(n);{var m=s=>{var d=st();h(s,d)},j=s=>{var d=ot(),y=a(d),B=r(a(y),4),L=a(B,!0);t(B),t(y),t(d),S(()=>i(L,e(A))),h(s,d)},T=s=>{Xe(s,{get nodes(){return e(x).nodes},get edges(){return e(x).edges},get centerId(){return e(x).center_id},get events(){return $()},get isDreaming(){return e(l)},onSelect:J})};O(_,s=>{e(P)?s(m):e(A)?s(j,1):e(x)&&s(T,2)})}var v=r(_,2),R=a(v),C=a(R);He(C);var U=r(C,2);t(R);var K=r(R,2),V=a(K),X=a(V);X.value=X.__value=50;var ee=r(X);ee.value=ee.__value=100;var te=r(ee);te.value=te.__value=150;var xe=r(te);xe.value=xe.__value=200,t(V);var q=r(V,2),$e=a(q,!0);t(q);var Ae=r(q,2);t(K),t(v);var ae=r(v,2),Fe=a(ae);{var Ge=s=>{var d=it(),y=Ve(d),B=a(y);t(y);var L=r(y,4),Y=a(L);t(L);var I=r(L,4),re=a(I);t(I),S(()=>{i(B,`${e(x).nodeCount??""} nodes`),i(Y,`${e(x).edgeCount??""} edges`),i(re,`depth ${e(x).depth??""}`)}),h(s,d)};O(Fe,s=>{e(x)&&s(Ge)})}t(ae);var Ce=r(ae,2);{var Le=s=>{var d=vt(),y=a(d),B=r(a(y),2);t(y);var L=r(y,2),Y=a(L),I=a(Y),re=a(I,!0);t(I);var Me=r(I,2);pe(Me,17,()=>e(o).tags,ue,(g,c)=>{var D=nt(),N=a(D,!0);t(D),S(()=>i(N,e(c))),h(g,D)}),t(Y);var se=r(Y,2),je=a(se,!0);t(se);var oe=r(se,2);pe(oe,21,()=>[{label:"Retention",value:e(o).retentionStrength},{label:"Storage",value:e(o).storageStrength},{label:"Retrieval",value:e(o).retrievalStrength}],ue,(g,c)=>{var D=dt(),N=a(D),ve=a(N),Be=a(ve,!0);t(ve);var _e=r(ve,2),Ie=a(_e);t(_e),t(N);var ye=r(N,2),Qe=a(ye);t(ye),t(D),S(Te=>{i(Be,e(c).label),i(Ie,`${Te??""}%`),Se(Qe,`width: ${e(c).value*100}%; background: ${e(c).value>.7?"#10b981":e(c).value>.4?"#f59e0b":"#ef4444"}`)},[()=>(e(c).value*100).toFixed(1)]),h(g,D)}),t(oe);var ie=r(oe,2),Re=r(a(ie),2);{let g=ce(()=>e(o).storageStrength*30);rt(Re,{get retention(){return e(o).retentionStrength},get stability(){return e(g)}})}t(ie);var ne=r(ie,2),de=a(ne),Ne=a(de);t(de);var le=r(de,2),ze=a(le);t(le);var me=r(le,2);{var Ee=g=>{var c=lt(),D=a(c);t(c),S(N=>i(D,`Accessed: ${N??""}`),[()=>new Date(e(o).lastAccessedAt).toLocaleString()]),h(g,c)};O(me,g=>{e(o).lastAccessedAt&&g(Ee)})}var be=r(me,2),Pe=a(be);t(be),t(ne);var fe=r(ne,2),ge=a(fe),qe=r(ge,2);t(fe),ke(2),t(L),t(d),S((g,c)=>{i(re,e(o).nodeType),i(je,e(o).content),i(Ne,`Created: ${g??""}`),i(ze,`Updated: ${c??""}`),i(Pe,`Reviews: ${e(o).reviewCount??0??""}`)},[()=>new Date(e(o).createdAt).toLocaleString(),()=>new Date(e(o).updatedAt).toLocaleString()]),M("click",B,()=>b(o,null)),M("click",ge,()=>{e(o)&&Z.memories.promote(e(o).id)}),M("click",qe,()=>{e(o)&&Z.memories.demote(e(o).id)}),h(s,d)};O(Ce,s=>{e(o)&&s(Le)})}t(n),S(()=>{q.disabled=e(l),Je(q,1,`px-4 py-2 rounded-lg bg-dream/20 border border-dream/40 text-dream-glow text-sm
hover:bg-dream/30 transition-all backdrop-blur-sm disabled:opacity-50
${e(l)?"glow-dream animate-pulse-glow":""}`),i($e,e(l)?"◈ Dreaming...":"◈ Dream")}),M("keydown",C,s=>s.key==="Enter"&&Q()),Ze(C,()=>e(k),s=>b(k,s)),M("click",U,Q),M("change",V,()=>G()),Ke(V,()=>e(F),s=>b(F,s)),M("click",q,H),M("click",Ae,()=>G()),h(W,n),De(),E()}Ye(["keydown","click","change"]);export{At as component};

Some files were not shown because too many files have changed in this diff Show more