mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-25 00:36:22 +02:00
First AI memory system to model forgetting as a neuroscience-grounded PROCESS rather than passive decay. Adds the `suppress` MCP tool (#24), Rac1 cascade worker, migration V10, and dashboard forgetting indicators. Based on: - Anderson, Hanslmayr & Quaegebeur (2025), Nat Rev Neurosci — right lateral PFC as the domain-general inhibitory controller; SIF compounds with each stopping attempt. - Cervantes-Sandoval et al. (2020), Front Cell Neurosci PMC7477079 — Rac1 GTPase as the active synaptic destabilization mechanism. What's new: * `suppress` MCP tool — each call compounds `suppression_count` and subtracts a `0.15 × count` penalty (saturating at 80%) from retrieval scores during hybrid search. Distinct from delete (removes) and demote (one-shot). * Rac1 cascade worker — background sweep piggybacks the 6h consolidation loop, walks `memory_connections` edges from recently-suppressed seeds, applies attenuated FSRS decay to co-activated neighbors. You don't just forget Jake — you fade the café, the roommate, the birthday. * 24h labile window — reversible via `suppress({id, reverse: true})` within 24 hours. Matches Nader reconsolidation semantics. * Migration V10 — additive-only (`suppression_count`, `suppressed_at` + partial indices). All v2.0.x DBs upgrade seamlessly on first launch. * Dashboard: `ForgettingIndicator.svelte` pulses when suppressions are active. 3D graph nodes dim to 20% opacity when suppressed. New WebSocket events: `MemorySuppressed`, `MemoryUnsuppressed`, `Rac1CascadeSwept`. Heartbeat carries `suppressed_count`. * Search pipeline: SIF penalty inserted into the accessibility stage so it stacks on top of passive FSRS decay. * Tool count bumped 23 → 24. Cognitive modules 29 → 30. Memories persist — they are INHIBITED, not erased. `memory.get(id)` returns full content through any number of suppressions. The 24h labile window is a grace period for regret. Also fixes issue #31 (dashboard graph view buggy) as a companion UI bug discovered during the v2.0.5 audit cycle: * Root cause: node glow `SpriteMaterial` had no `map`, so `THREE.Sprite` rendered as a solid-coloured 1×1 plane. Additive blending + `UnrealBloomPass(0.8, 0.4, 0.85)` amplified the square edges into hard-edged glowing cubes. * Fix: shared 128×128 radial-gradient `CanvasTexture` singleton used as the sprite map. Retuned bloom to `(0.55, 0.6, 0.2)`. Halved fog density (0.008 → 0.0035). Edges bumped from dark navy `0x4a4a7a` to brand violet `0x8b5cf6` with higher opacity. Added explicit `scene.background` and a 2000-point starfield for depth. * 21 regression tests added in `ui-fixes.test.ts` locking every invariant in (shared texture singleton, depthWrite:false, scale ×6, bloom magic numbers via source regex, starfield presence). Tests: 1,284 Rust (+47) + 171 Vitest (+21) = 1,455 total, 0 failed Clippy: clean across all targets, zero warnings Release binary: 22.6MB, `cargo build --release -p vestige-mcp` green Versions: workspace aligned at 2.0.5 across all 6 crates/packages Closes #31
1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
import{ah as F,b as fe,an as ae,T as D,ac as L,ao as ie,a7 as le,g as W,a8 as ue,aa as se,ab as Z,ad as q,aj as z,ap as oe,aq as te,ar as $,U as ve,as as T,ai as y,at as de,al as ce,L as pe,a4 as _e,au as V,av as he,aw as ge,a2 as Ee,ax as j,ay as me,ae as ne,ag as re,az as B,A as Te,aA as Ae,aB as Ce,aC as we,af as Se,aD as Ie}from"./nyjtQ1Ok.js";function De(e,n){return n}function Ne(e,n,l){for(var t=[],g=n.length,s,u=n.length,c=0;c<g;c++){let E=n[c];re(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,r=v.parentNode;we(r),r.append(v),e.items.clear()}U(n,!i)}else s={pending:new Set(n),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function U(e,n=!0){for(var l=0;l<e.length;l++)Se(e[l],n)}var ee;function He(e,n,l,t,g,s=null){var u=e,c=new Map,i=(n&ae)!==0;if(i){var v=e;u=D?L(ie(v)):v.appendChild(F())}D&&le();var r=null,E=pe(()=>{var f=l();return _e(f)?f:f==null?[]:V(f)}),o,d=!0;function C(){a.fallback=r,xe(a,o,u,n,t),r!==null&&(o.length===0?(r.f&T)===0?ne(r):(r.f^=T,M(r,null,u)):re(r,()=>{r=null}))}var I=fe(()=>{o=W(E);var f=o.length;let N=!1;if(D){var x=ue(u)===se;x!==(f===0)&&(u=Z(),L(u),q(!1),N=!0)}for(var _=new Set,w=ve,b=ce(),p=0;p<f;p+=1){D&&z.nodeType===oe&&z.data===te&&(u=z,N=!0,q(!1));var S=o[p],R=t(S,p),h=d?null:c.get(R);h?(h.v&&$(h.v,S),h.i&&$(h.i,p),b&&w.unskip_effect(h.e)):(h=be(c,d?u:ee??(ee=F()),S,R,p,g,n,l),d||(h.e.f|=T),c.set(R,h)),_.add(R)}if(f===0&&s&&!r&&(d?r=y(()=>s(u)):(r=y(()=>s(ee??(ee=F()))),r.f|=T)),f>_.size&&de(),D&&f>0&&L(Z()),!d)if(b){for(const[k,O]of c)_.has(k)||w.skip_effect(O.e);w.oncommit(C),w.ondiscard(()=>{})}else C();N&&q(!0),W(E)}),a={effect:I,items:c,outrogroups:null,fallback:r};d=!1,D&&(u=z)}function H(e){for(;e!==null&&(e.f&Ae)===0;)e=e.next;return e}function xe(e,n,l,t,g){var h,k,O,Y,X,G,J,K,P;var s=(t&Ce)!==0,u=n.length,c=e.items,i=H(e.effect.first),v,r=null,E,o=[],d=[],C,I,a,f;if(s)for(f=0;f<u;f+=1)C=n[f],I=g(C,f),a=c.get(I).e,(a.f&T)===0&&((k=(h=a.nodes)==null?void 0:h.a)==null||k.measure(),(E??(E=new Set)).add(a));for(f=0;f<u;f+=1){if(C=n[f],I=g(C,f),a=c.get(I).e,e.outrogroups!==null)for(const m of e.outrogroups)m.pending.delete(a),m.done.delete(a);if((a.f&T)!==0)if(a.f^=T,a===i)M(a,null,l);else{var N=r?r.next:i;a===e.effect.last&&(e.effect.last=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),A(e,r,a),A(e,a,N),M(a,N,l),r=a,o=[],d=[],i=H(r.next);continue}if((a.f&B)!==0&&(ne(a),s&&((Y=(O=a.nodes)==null?void 0:O.a)==null||Y.unfix(),(E??(E=new Set)).delete(a))),a!==i){if(v!==void 0&&v.has(a)){if(o.length<d.length){var x=d[0],_;r=x.prev;var w=o[0],b=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,b.next),A(e,r,w),A(e,b,x),i=x,r=b,f-=1,o=[],d=[]}else v.delete(a),M(a,i,l),A(e,a.prev,a.next),A(e,a,r===null?e.effect.first:r.next),A(e,r,a),r=a;continue}for(o=[],d=[];i!==null&&i!==a;)(v??(v=new Set)).add(i),d.push(i),i=H(i.next);if(i===null)continue}(a.f&T)===0&&o.push(a),r=a,i=H(a.next)}if(e.outrogroups!==null){for(const m of e.outrogroups)m.pending.size===0&&(U(V(m.done)),(X=e.outrogroups)==null||X.delete(m));e.outrogroups.size===0&&(e.outrogroups=null)}if(i!==null||v!==void 0){var p=[];if(v!==void 0)for(a of v)(a.f&B)===0&&p.push(a);for(;i!==null;)(i.f&B)===0&&i!==e.fallback&&p.push(i),i=H(i.next);var S=p.length;if(S>0){var R=(t&ae)!==0&&u===0?l:null;if(s){for(f=0;f<S;f+=1)(J=(G=p[f].nodes)==null?void 0:G.a)==null||J.measure();for(f=0;f<S;f+=1)(P=(K=p[f].nodes)==null?void 0:K.a)==null||P.fix()}Ne(e,p,R)}}s&&Te(()=>{var m,Q;if(E!==void 0)for(a of E)(Q=(m=a.nodes)==null?void 0:m.a)==null||Q.apply()})}function be(e,n,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(n,i??l,v??g,c),()=>{e.delete(t)}))}}function M(e,n,l){if(e.nodes)for(var t=e.nodes.start,g=e.nodes.end,s=n&&(n.f&T)===0?n.nodes.start:l;t!==null;){var u=Ie(t);if(s.before(t),t===g)return;t=u}}function A(e,n,l){n===null?e.effect.first=l:n.next=l,l===null?e.effect.last=n:l.prev=n}function Me(e,n,l){var t=e==null?"":""+e;return t===""?null:t}function ke(e,n){return e==null?null:String(e)}export{ke as a,He as e,De as i,Me as t};
|