vestige/apps/dashboard/build/_app/immutable/chunks/C4L78yoI.js
Sam Valladares 8178beb961 feat(v2.0.5): Intentional Amnesia — active forgetting via top-down inhibitory control
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
2026-04-14 17:30:30 -05:00

2 lines
7.6 KiB
JavaScript

var Ye=Object.defineProperty;var ce=t=>{throw TypeError(t)};var Ie=(t,e,r)=>e in t?Ye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var j=(t,e,r)=>Ie(t,typeof e!="symbol"?e+"":e,r),re=(t,e,r)=>e.has(t)||ce("Cannot "+r);var s=(t,e,r)=>(re(t,e,"read from private field"),r?r.call(t):e.get(t)),d=(t,e,r)=>e.has(t)?ce("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),a=(t,e,r,n)=>(re(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),p=(t,e,r)=>(re(t,e,"access private method"),r);import{aL as Me,g as Te,z as Ce,n as Pe,aM as ue,A as J,ax as Ee,aj as Y,T as I,F as x,aN as _e,b as Ve,a7 as xe,aa as Be,aO as pe,ai as F,ah as we,aP as se,ag as ie,ak as He,aQ as ge,aR as Le,aS as ve,aT as qe,aU as We,aV as Z,aW as G,aX as ye,aY as je,aZ as Re,k as Se,ar as ze,af as ae,ac as K,O as $e,ab as Ue,a_ as z,E as Je,a$ as Qe,b0 as Xe,b1 as Ze,a3 as Ge,b2 as ne,ao as Ke,ap as De,a9 as et,aD as tt,b3 as fe,ad as $,b4 as rt,aC as st,b5 as it,au as at,p as nt,aq as ft,b6 as ht,a as ot}from"./nyjtQ1Ok.js";import{b as dt}from"./B0IenmM-.js";function lt(t){let e=0,r=Ee(0),n;return()=>{Me()&&(Te(r),Ce(()=>(e===0&&(n=Pe(()=>t(()=>ue(r)))),e+=1,()=>{J(()=>{e-=1,e===0&&(n==null||n(),n=void 0,ue(r))})})))}}var ct=Je|Qe;function ut(t,e,r,n){new _t(t,e,r,n)}var m,W,w,C,g,R,T,E,S,P,A,B,H,L,D,ee,h,Ne,Ae,Oe,he,Q,X,oe;class _t{constructor(e,r,n,c){d(this,h);j(this,"parent");j(this,"is_pending",!1);j(this,"transform_error");d(this,m);d(this,W,I?Y:null);d(this,w);d(this,C);d(this,g);d(this,R,null);d(this,T,null);d(this,E,null);d(this,S,null);d(this,P,0);d(this,A,0);d(this,B,!1);d(this,H,new Set);d(this,L,new Set);d(this,D,null);d(this,ee,lt(()=>(a(this,D,Ee(s(this,P))),()=>{a(this,D,null)})));var i;a(this,m,e),a(this,w,r),a(this,C,f=>{var u=x;u.b=this,u.f|=_e,n(f)}),this.parent=x.b,this.transform_error=c??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),a(this,g,Ve(()=>{if(I){const f=s(this,W);xe();const u=f.data===Be;if(f.data.startsWith(pe)){const l=JSON.parse(f.data.slice(pe.length));p(this,h,Ae).call(this,l)}else u?p(this,h,Oe).call(this):p(this,h,Ne).call(this)}else p(this,h,he).call(this)},ct)),I&&a(this,m,Y)}defer_effect(e){We(e,s(this,H),s(this,L))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,w).pending}update_pending_count(e){p(this,h,oe).call(this,e),a(this,P,s(this,P)+e),!(!s(this,D)||s(this,B))&&(a(this,B,!0),J(()=>{a(this,B,!1),s(this,D)&&ze(s(this,D),s(this,P))}))}get_effect_pending(){return s(this,ee).call(this),Te(s(this,D))}error(e){var r=s(this,w).onerror;let n=s(this,w).failed;if(!r&&!n)throw e;s(this,R)&&(ae(s(this,R)),a(this,R,null)),s(this,T)&&(ae(s(this,T)),a(this,T,null)),s(this,E)&&(ae(s(this,E)),a(this,E,null)),I&&(K(s(this,W)),$e(),K(Ue()));var c=!1,i=!1;const f=()=>{if(c){Ze();return}c=!0,i&&Xe(),s(this,E)!==null&&ie(s(this,E),()=>{a(this,E,null)}),p(this,h,X).call(this,()=>{se.ensure(),p(this,h,he).call(this)})},u=o=>{try{i=!0,r==null||r(o,f),i=!1}catch(l){z(l,s(this,g)&&s(this,g).parent)}n&&a(this,E,p(this,h,X).call(this,()=>{se.ensure();try{return F(()=>{var l=x;l.b=this,l.f|=_e,n(s(this,m),()=>o,()=>f)})}catch(l){return z(l,s(this,g).parent),null}}))};J(()=>{var o;try{o=this.transform_error(e)}catch(l){z(l,s(this,g)&&s(this,g).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(u,l=>z(l,s(this,g)&&s(this,g).parent)):u(o)})}}m=new WeakMap,W=new WeakMap,w=new WeakMap,C=new WeakMap,g=new WeakMap,R=new WeakMap,T=new WeakMap,E=new WeakMap,S=new WeakMap,P=new WeakMap,A=new WeakMap,B=new WeakMap,H=new WeakMap,L=new WeakMap,D=new WeakMap,ee=new WeakMap,h=new WeakSet,Ne=function(){try{a(this,R,F(()=>s(this,C).call(this,s(this,m))))}catch(e){this.error(e)}},Ae=function(e){const r=s(this,w).failed;r&&a(this,E,F(()=>{r(s(this,m),()=>e,()=>()=>{})}))},Oe=function(){const e=s(this,w).pending;e&&(this.is_pending=!0,a(this,T,F(()=>e(s(this,m)))),J(()=>{var r=a(this,S,document.createDocumentFragment()),n=we();r.append(n),a(this,R,p(this,h,X).call(this,()=>(se.ensure(),F(()=>s(this,C).call(this,n))))),s(this,A)===0&&(s(this,m).before(r),a(this,S,null),ie(s(this,T),()=>{a(this,T,null)}),p(this,h,Q).call(this))}))},he=function(){try{if(this.is_pending=this.has_pending_snippet(),a(this,A,0),a(this,P,0),a(this,R,F(()=>{s(this,C).call(this,s(this,m))})),s(this,A)>0){var e=a(this,S,document.createDocumentFragment());He(s(this,R),e);const r=s(this,w).pending;a(this,T,F(()=>r(s(this,m))))}else p(this,h,Q).call(this)}catch(r){this.error(r)}},Q=function(){this.is_pending=!1;for(const e of s(this,H))ge(e,Le),ve(e);for(const e of s(this,L))ge(e,qe),ve(e);s(this,H).clear(),s(this,L).clear()},X=function(e){var r=x,n=Re,c=Se;Z(s(this,g)),G(s(this,g)),ye(s(this,g).ctx);try{return e()}catch(i){return je(i),null}finally{Z(r),G(n),ye(c)}},oe=function(e){var r;if(!this.has_pending_snippet()){this.parent&&p(r=this.parent,h,oe).call(r,e);return}a(this,A,s(this,A)+e),s(this,A)===0&&(p(this,h,Q).call(this),s(this,T)&&ie(s(this,T),()=>{a(this,T,null)}),s(this,S)&&(s(this,m).before(s(this,S)),a(this,S,null)))};const pt=["touchstart","touchmove"];function gt(t){return pt.includes(t)}const M=Symbol("events"),ke=new Set,de=new Set;function Tt(t,e,r){(e[M]??(e[M]={}))[t]=r}function Et(t){for(var e=0;e<t.length;e++)ke.add(t[e]);for(var r of de)r(t)}let be=null;function me(t){var O,b;var e=this,r=e.ownerDocument,n=t.type,c=((O=t.composedPath)==null?void 0:O.call(t))||[],i=c[0]||t.target;be=t;var f=0,u=be===t&&t[M];if(u){var o=c.indexOf(u);if(o!==-1&&(e===document||e===window)){t[M]=e;return}var l=c.indexOf(e);if(l===-1)return;o<=l&&(f=o)}if(i=c[f]||t.target,i!==e){Ge(t,"currentTarget",{configurable:!0,get(){return i||r}});var V=Re,q=x;G(null),Z(null);try{for(var N,v=[];i!==null;){var _=i.assignedSlot||i.parentNode||i.host||null;try{var y=(b=i[M])==null?void 0:b[n];y!=null&&(!i.disabled||t.target===i)&&y.call(i,t)}catch(k){N?v.push(k):N=k}if(t.cancelBubble||_===e||_===null)break;i=_}if(N){for(let k of v)queueMicrotask(()=>{throw k});throw N}}finally{t[M]=e,delete t.currentTarget,G(V),Z(q)}}}function wt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function vt(t,e){return Fe(t,e)}function Rt(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=I,c=Y;try{for(var i=Ke(r);i&&(i.nodeType!==De||i.data!==et);)i=tt(i);if(!i)throw fe;$(!0),K(i);const f=Fe(t,{...e,anchor:i});return $(!1),f}catch(f){if(f instanceof Error&&f.message.split(`
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw f;return f!==fe&&console.warn("Failed to hydrate: ",f),e.recover===!1&&rt(),ne(),st(r),$(!1),vt(t,e)}finally{$(n),K(c)}}const U=new Map;function Fe(t,{target:e,anchor:r,props:n={},events:c,context:i,intro:f=!0,transformError:u}){ne();var o=void 0,l=it(()=>{var V=r??e.appendChild(we());ut(V,{pending:()=>{}},v=>{nt({});var _=Se;if(i&&(_.c=i),c&&(n.$$events=c),I&&dt(v,null),o=t(v,n)||{},I&&(x.nodes.end=Y,Y===null||Y.nodeType!==De||Y.data!==ft))throw ht(),fe;ot()},u);var q=new Set,N=v=>{for(var _=0;_<v.length;_++){var y=v[_];if(!q.has(y)){q.add(y);var O=gt(y);for(const te of[e,document]){var b=U.get(te);b===void 0&&(b=new Map,U.set(te,b));var k=b.get(y);k===void 0?(te.addEventListener(y,me,{passive:O}),b.set(y,1)):b.set(y,k+1)}}}};return N(at(ke)),de.add(N),()=>{var O;for(var v of q)for(const b of[e,document]){var _=U.get(b),y=_.get(v);--y==0?(b.removeEventListener(v,me),_.delete(v),_.size===0&&U.delete(b)):_.set(v,y)}de.delete(N),V!==r&&((O=V.parentNode)==null||O.removeChild(V))}});return le.set(o,l),o}let le=new WeakMap;function St(t,e){const r=le.get(t);return r?(le.delete(t),r(e)):Promise.resolve()}export{Tt as a,Et as d,Rt as h,vt as m,wt as s,St as u};