mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-22 23:31:02 +02:00
* patch(backfill-safety): VESTIGE_BACKFILL_AUTOFIRE gate (default OFF) + bounded promote_memory_backfill
Off-by-default env gate around step-8.5 auto-fire in run_consolidation (decouples
backfill from consolidation cadence). New promote_memory_backfill caps stability at
MIN(stability*1.5, stability+365.0) (the bound retroactive_backfill.rs:300 already
computes but discarded); both backfill entry points use it. Fixes the false 'capped'
comment. Cloud-sync excluded at build (--no-default-features). Pending upstream PR to
samvallad33/vestige. omega-backfill-safety-v2.2.0 off tag v2.2.0 (3bcd4667).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* release: v2.2.1 — Windows embeddings fix + backfill safety + first-run guide
Board-clearing patch release.
Fixes:
- #101 Windows embeddings: release.yml already restores vector-search on the
x86_64-pc-windows-msvc target (merged in #102); this release rebuilds the
Windows binary so users actually get working embeddings.
- #103 Retroactive Salience Backfill safety (from community PR #104, adjusted):
* promote_memory_backfill bounds the stability multiply to
MIN(stability*1.5, stability+365.0) on both auto-fire and manual paths.
* VESTIGE_BACKFILL_AUTOFIRE gate — default ON (preserves the shipped/documented
v2.2.0 behavior), disable with 0/false/off/no. Env value is trimmed.
* Corrected the false "capped" comment and the promote_memory_backfill doc.
* Added 3 tests: +365 cap binds, *1.5 multiply below crossover, gate parsing.
Docs:
- #83 First-Run: new docs/GETTING-STARTED.md + README pointer.
- Consolidated roadmap issues #82,#84-#92 into docs/ROADMAP.md (Tracked Issues).
- Documented VESTIGE_BACKFILL_AUTOFIRE in docs/CONFIGURATION.md.
- CHANGELOG v2.2.1 entry.
Version bumped to 2.2.1 across all manifests + Cargo.lock + dashboard build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Peter Lauzon <inbijiburu@protonmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 lines
14 KiB
JavaScript
8 lines
14 KiB
JavaScript
import"../chunks/Bzak7iHL.js";import{o as Lt}from"../chunks/TZu9D97Z.js";import{G as Zt,T as Ut,aC as Vt,q as Yt,p as Bt,i as F,e as n,t as M,g as t,a as x,h as i,r,b as Dt,u as g,s as H,c as jt,f as Q,au as bt,d as zt,j as _,a9 as Jt,k as Qt,n as St}from"../chunks/wpu9U-D0.js";import{s as k,d as te,a as Ct}from"../chunks/D8mhvFt8.js";import{i as R}from"../chunks/DKve45Wd.js";import{B as ee}from"../chunks/BWk3o_TN.js";import{e as tt,i as nt,a as u}from"../chunks/60_R_Vbt.js";import{a as Ft,r as Et}from"../chunks/P1-U_Xsj.js";import{s as ae}from"../chunks/EqHb-9AZ.js";import{b as re}from"../chunks/CnZzd20v.js";import{g as se}from"../chunks/dCAmqaEc.js";import{b as ne}from"../chunks/Bxs5UR9-.js";import{a as Tt}from"../chunks/CZfHMhLI.js";import{N as oe}from"../chunks/CcUbQ_Wl.js";import{p as ie}from"../chunks/ByYB047u.js";import{P as le}from"../chunks/BHDZZvku.js";import{A as de}from"../chunks/DcKTNC6e.js";import{I as It}from"../chunks/D7A-gG4Z.js";import{s as ce}from"../chunks/DPdYG9yN.js";const ve=Symbol("NaN");function pe(o,C,f){Zt&&Ut();var p=new ee(o),$=!Vt();Yt(()=>{var h=C();h!==h&&(h=ve),$&&h!==null&&typeof h=="object"&&(h={}),p.ensure(h,f)})}function Nt(o){return o==null||!Number.isFinite(o)||o<0?0:o>1?1:o}function me(o){return{novelty:Nt(o==null?void 0:o.novelty),arousal:Nt(o==null?void 0:o.arousal),reward:Nt(o==null?void 0:o.reward),attention:Nt(o==null?void 0:o.attention)}}const Rt={sm:80,md:180,lg:320};function Ot(o){return o&&(o==="sm"||o==="md"||o==="lg")?Rt[o]:Rt.md}const wt=[{key:"novelty",angle:-Math.PI/2},{key:"arousal",angle:0},{key:"reward",angle:Math.PI/2},{key:"attention",angle:Math.PI}];function ue(o){const C=Ot(o);let f;switch(o){case"lg":f=44;break;case"sm":f=4;break;default:f=28}return Math.max(0,C/2-f)}var xe=bt('<path fill="none" stroke="var(--color-muted)"></path>'),fe=bt('<line stroke="var(--color-muted)" stroke-opacity="0.2" stroke-width="0.75"></line>'),ge=bt('<circle fill="var(--color-synapse-glow)"></circle>'),ye=bt('<text dominant-baseline="middle" fill="var(--color-bright)" font-family="var(--font-mono)" font-weight="600"> </text><text dominant-baseline="middle" fill="var(--color-dim)" font-family="var(--font-mono)"> </text>',1),_e=bt('<svg role="img"><!><!><path fill="var(--color-synapse-glow)" fill-opacity="0.3" stroke="var(--color-synapse-glow)" stroke-linejoin="round"></path><!><!></svg>');function $t(o,C){Bt(C,!0);let f=ie(C,"size",3,"md"),p=g(()=>Ot(f())),$=g(()=>f()!=="sm"),h=g(()=>ue(f())),et=g(()=>t(p)/2),at=g(()=>t(p)/2);const Pt={novelty:"Novelty",arousal:"Arousal",reward:"Reward",attention:"Attention"};let I=g(()=>me({novelty:C.novelty,arousal:C.arousal,reward:C.reward,attention:C.attention}));function K(l,d){const s=l*t(h);return[t(et)+Math.cos(d)*s,t(at)+Math.sin(d)*s]}const ot=[.25,.5,.75,1];function it(l){return wt.map(({angle:s})=>K(l,s)).map((s,c)=>`${c===0?"M":"L"}${s[0].toFixed(2)},${s[1].toFixed(2)}`).join(" ")+" Z"}let L=H(0);Lt(()=>{const d=performance.now();let s=0;const c=w=>{const y=Math.min(1,(w-d)/600);F(L,1-Math.pow(1-y,3)),y<1&&(s=requestAnimationFrame(c))};return s=requestAnimationFrame(c),()=>cancelAnimationFrame(s)});let lt=g(()=>{const l=t(L);return wt.map(({key:s,angle:c})=>K(t(I)[s]*l,c)).map((s,c)=>`${c===0?"M":"L"}${s[0].toFixed(2)},${s[1].toFixed(2)}`).join(" ")+" Z"});function kt(l){const d=t(h)+(f()==="lg"?18:12),s=t(et)+Math.cos(l)*d,c=t(at)+Math.sin(l)*d;let w="middle";return Math.abs(Math.cos(l))>.5&&(w=Math.cos(l)>0?"start":"end"),{x:s,y:c,anchor:w}}var j=_e(),dt=n(j);tt(dt,17,()=>ot,nt,(l,d)=>{var s=xe();M(c=>{u(s,"d",c),u(s,"stroke-opacity",t(d)===1?.45:.18),u(s,"stroke-width",t(d)===1?1:.75)},[()=>it(t(d))]),x(l,s)});var Mt=i(dt);tt(Mt,17,()=>wt,nt,(l,d)=>{const s=g(()=>{const[w,y]=K(1,t(d).angle);return{x:w,y}});var c=fe();M(()=>{u(c,"x1",t(et)),u(c,"y1",t(at)),u(c,"x2",t(s).x),u(c,"y2",t(s).y)}),x(l,c)});var G=i(Mt),ct=i(G);{var rt=l=>{var d=jt(),s=Q(d);tt(s,17,()=>wt,nt,(c,w)=>{const y=g(()=>{const[P,pt]=K(t(I)[t(w).key]*t(L),t(w).angle);return{px:P,py:pt}});var N=ge();M(()=>{u(N,"cx",t(y).px),u(N,"cy",t(y).py),u(N,"r",f()==="lg"?3:2.25)}),x(c,N)}),x(l,d)};R(ct,l=>{f()!=="sm"&&l(rt)})}var At=i(ct);{var vt=l=>{var d=jt(),s=Q(d);tt(s,17,()=>wt,nt,(c,w)=>{const y=g(()=>kt(t(w).angle));var N=ye(),P=Q(N),pt=n(P);r(P);var q=i(P),mt=n(q,!0);r(q),M(ut=>{u(P,"x",t(y).x),u(P,"y",t(y).y),u(P,"text-anchor",t(y).anchor),u(P,"font-size",f()==="lg"?12:10),k(pt,`${ut??""}%`),u(q,"x",t(y).x),u(q,"y",t(y).y+(f()==="lg"?14:11)),u(q,"text-anchor",t(y).anchor),u(q,"font-size",f()==="lg"?10:8.5),k(mt,Pt[t(w).key])},[()=>(t(I)[t(w).key]*100).toFixed(0)]),x(c,N)}),x(l,d)};R(At,l=>{t($)&&l(vt)})}r(j),M((l,d,s,c)=>{u(j,"width",t(p)),u(j,"height",t(p)),u(j,"viewBox",`0 0 ${t(p)??""} ${t(p)??""}`),u(j,"aria-label",`Importance radar: novelty ${l??""}%, arousal ${d??""}%, reward ${s??""}%, attention ${c??""}%`),u(G,"d",t(lt)),u(G,"stroke-width",f()==="sm"?1:1.5)},[()=>(t(I).novelty*100).toFixed(0),()=>(t(I).arousal*100).toFixed(0),()=>(t(I).reward*100).toFixed(0),()=>(t(I).attention*100).toFixed(0)]),x(o,j),Dt()}var he=_('<span class="text-xs text-decay"> </span>'),we=_('Driven by <span class="text-bright"> </span> ',1),be=_('<div class="relative z-[1] w-full text-center space-y-1 enter"><div class="flex items-center justify-center gap-1.5 text-lg font-semibold text-recall"><!> <span>Save</span></div> <p class="text-xs text-dim leading-relaxed"> <!></p></div>'),ke=_('Weakest channel: <span class="text-bright"> </span> ',1),Me=_('<div class="relative z-[1] w-full text-center space-y-1 enter"><div class="flex items-center justify-center gap-1.5 text-lg font-semibold text-decay"><!> <span>Skip</span></div> <p class="text-xs text-dim leading-relaxed"> <!></p></div>'),Ae=_('<div class="relative z-[1] text-center enter"><div class="text-[10px] uppercase tracking-widest text-muted">Composite</div> <div class="text-5xl font-semibold text-aurora leading-none mt-1 tabular-nums"><!></div></div> <!> <!>',1),Se=_(`<div class="relative z-[1] flex flex-col items-center justify-center min-h-[320px] w-full text-center px-4"><div class="text-warning/70 mb-3 breathe"><!></div> <p class="text-sm text-dim">Type some content above to score its importance.</p> <p class="text-xs text-muted mt-2 max-w-xs">Composite = 0.25·novelty + 0.30·arousal + 0.25·reward + 0.20·attention.
|
||
Threshold for save: 60%.</p></div>`),Ce=_('<div class="h-28 glass-subtle rounded-xl shimmer"></div>'),Fe=_('<div class="grid gap-3 md:grid-cols-2"></div>'),Ie=_(`<div class="flex flex-col items-center justify-center text-center py-16 px-6 glass-subtle rounded-2xl enter"><div class="text-warning/60 mb-3 breathe"><!></div> <p class="text-sm text-bright font-medium">No standout memories yet</p> <p class="text-xs text-muted mt-1.5 max-w-sm">As you capture decisions, wins, and discoveries, the most important ones
|
||
will rise to the top here — ranked by retention, reviews, and recency.</p></div>`),Ne=_('<span class="text-xs text-muted">·</span> <span class="text-xs text-muted"> </span>',1),Pe=_('<span class="text-[10px] px-1.5 py-0.5 bg-white/[0.04] rounded text-muted"> </span>'),Ee=_('<div class="flex gap-1.5 flex-wrap"></div>'),Te=_(`<button type="button" class="lift text-left p-4 glass-subtle rounded-xl hover:bg-white/[0.04] hover:border-synapse/30
|
||
transition-all duration-200 flex items-start gap-4"><div class="flex-1 min-w-0 space-y-2"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full"></span> <span class="text-xs text-dim"> </span> <span class="text-xs text-muted">·</span> <span class="text-xs text-muted"> </span> <!></div> <p class="text-sm text-text leading-relaxed line-clamp-3"> </p> <!></div> <div class="flex-shrink-0"><!></div></button>`),je=_('<div class="grid gap-3 md:grid-cols-2"></div>'),ze=_(`<div class="p-6 max-w-5xl mx-auto space-y-8"><!> <section class="glass-panel rounded-2xl p-6 space-y-5"><div><h2 class="text-sm font-semibold text-bright uppercase tracking-wider">Test Importance</h2> <p class="text-xs text-muted mt-1">Paste any content below. Vestige scores it across 4 channels and
|
||
decides whether it is worth saving.</p></div> <div class="grid md:grid-cols-[1fr_auto] gap-5 items-start"><div class="space-y-3"><textarea placeholder="Type some content above to score its importance." class="w-full min-h-40 px-4 py-3 bg-white/[0.03] border border-synapse/10 rounded-xl text-text text-sm
|
||
placeholder:text-muted focus:outline-none focus:border-synapse/40 focus:ring-1 focus:ring-synapse/20
|
||
transition backdrop-blur-sm resize-y font-mono"></textarea> <div class="flex items-center gap-3"><button class="px-4 py-2 bg-synapse/20 text-synapse-glow text-sm rounded-xl border border-synapse/30
|
||
hover:bg-synapse/30 hover:border-synapse/50 transition disabled:opacity-40 disabled:cursor-not-allowed"> </button> <span class="text-xs text-muted">⌘/Ctrl + Enter</span> <!></div></div> <div class="spotlight-surface flex flex-col items-center gap-4 md:min-w-[340px] rounded-2xl"><!></div></div></section> <section class="space-y-4"><div class="flex items-end justify-between"><div><h2 class="text-sm font-semibold text-bright uppercase tracking-wider">Top Important Memories This Week</h2> <p class="text-xs text-muted mt-1">Ranked by retention × reviews ÷ age. Click any card to open it.</p></div> <button class="text-xs text-muted hover:text-text transition">Refresh</button></div> <!></section></div>`);function ea(o,C){Bt(C,!0);let f=H(""),p=H(null),$=H(!1),h=H(null),et=H(0);async function at(){const e=t(f).trim();if(!(!e||t($))){F($,!0),F(h,null);try{F(p,await Tt.importance(e),!0),Jt(et)}catch(a){F(h,a instanceof Error?a.message:String(a),!0),F(p,null)}finally{F($,!1)}}}function Pt(e){(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),at())}const I={novelty:.25,arousal:.3,reward:.25,attention:.2},K={novelty:{high:"new information not already in your graph",low:"overlaps heavily with what you already know"},arousal:{high:"emotionally salient — decisions, bugs, or discoveries stick",low:"neutral tone, no strong affect signal"},reward:{high:"high reward value — preferences, wins, or solutions you will revisit",low:"low reward value — transient or incidental detail"},attention:{high:"strong attentional markers (imperatives, questions, urgency)",low:"passive phrasing, no clear attentional hook"}};let ot=g(()=>t(p)?Object.keys(I).map(a=>({key:a,contribution:t(p).channels[a]*I[a]})).sort((a,v)=>v.contribution-a.contribution)[0]:null),it=g(()=>t(p)?Object.keys(I).slice().sort((e,a)=>t(p).channels[e]-t(p).channels[a])[0]:null),L=H(zt([])),lt=H(!0),kt=zt({});function j(e){const a=Math.max(1,(Date.now()-new Date(e.createdAt).getTime())/864e5),v=e.reviewCount??0,m=1/Math.pow(a,.5);return e.retentionStrength*Math.log1p(v+1)*m}async function dt(){F(lt,!0);try{const a=(await Tt.memories.list({limit:"20"})).memories.slice().sort((v,m)=>j(m)-j(v)).slice(0,20);F(L,a,!0),t(L).forEach(async v=>{try{const m=await Tt.importance(v.content);kt[v.id]=m.channels}catch{}})}catch{F(L,[],!0)}finally{F(lt,!1)}}Lt(dt);function Mt(e){se(`${ne}/memories`)}var G=ze(),ct=n(G);le(ct,{icon:"importance",title:"Importance Radar",subtitle:"4-channel importance model: Novelty · Arousal · Reward · Attention",accent:"warning"});var rt=i(ct,2),At=i(n(rt),2),vt=n(At),l=n(vt);Qt(l);var d=i(l,2),s=n(d),c=n(s,!0);r(s);var w=i(s,4);{var y=e=>{var a=he(),v=n(a,!0);r(a),M(()=>k(v,t(h))),x(e,a)};R(w,e=>{t(h)&&e(y)})}r(d),r(vt);var N=i(vt,2),P=n(N);{var pt=e=>{var a=Ae(),v=Q(a),m=i(n(v),2),xt=n(m);de(xt,{get value(){return t(p).composite},scale:100,decimals:0,suffix:"%"}),r(m),r(v);var W=i(v,2);pe(W,()=>t(et),E=>{$t(E,{get novelty(){return t(p).channels.novelty},get arousal(){return t(p).channels.arousal},get reward(){return t(p).channels.reward},get attention(){return t(p).channels.attention},size:"lg"})});var X=i(W,2);{var ft=E=>{var T=be(),B=n(T),Z=n(B);It(Z,{name:"sparkle",size:18}),St(2),r(B);var U=i(B,2),V=n(U),yt=i(V);{var Y=A=>{var J=we(),D=i(Q(J)),st=n(D,!0);r(D);var _t=i(D);M(()=>{k(st,t(ot).key),k(_t,` — ${K[t(ot).key].high??""}.`)}),x(A,J)};R(yt,A=>{t(ot)&&A(Y)})}r(U),r(T),M(A=>k(V,`Composite ${A??""}% > 60% threshold. `),[()=>(t(p).composite*100).toFixed(0)]),x(E,T)},gt=E=>{var T=Me(),B=n(T),Z=n(B);It(Z,{name:"close",size:18}),St(2),r(B);var U=i(B,2),V=n(U),yt=i(V);{var Y=A=>{var J=ke(),D=i(Q(J)),st=n(D,!0);r(D);var _t=i(D);M(()=>{k(st,t(it)),k(_t,` — ${K[t(it)].low??""}.`)}),x(A,J)};R(yt,A=>{t(it)&&A(Y)})}r(U),r(T),M(A=>k(V,`Composite ${A??""}% < 60% threshold. `),[()=>(t(p).composite*100).toFixed(0)]),x(E,T)};R(X,E=>{t(p).composite>.6?E(ft):E(gt,!1)})}x(e,a)},q=e=>{var a=Se(),v=n(a),m=n(v);It(m,{name:"importance",size:36}),r(v),St(4),r(a),x(e,a)};R(P,e=>{t(p)?e(pt):e(q,!1)})}r(N),Ft(N,e=>{var a;return(a=ce)==null?void 0:a(e)}),r(At),r(rt),Ft(rt,e=>{var a;return(a=Et)==null?void 0:a(e)});var mt=i(rt,2),ut=n(mt),qt=i(n(ut),2);r(ut);var Ht=i(ut,2);{var Kt=e=>{var a=Fe();tt(a,20,()=>Array(6),nt,(v,m)=>{var xt=Ce();x(v,xt)}),r(a),x(e,a)},Gt=e=>{var a=Ie(),v=n(a),m=n(v);It(m,{name:"importance",size:40}),r(v),St(4),r(a),x(e,a)},Wt=e=>{var a=je();tt(a,23,()=>t(L),v=>v.id,(v,m,xt)=>{const W=g(()=>kt[t(m).id]);var X=Te(),ft=n(X),gt=n(ft),E=n(gt),T=i(E,2),B=n(T,!0);r(T);var Z=i(T,4),U=n(Z);r(Z);var V=i(Z,2);{var yt=S=>{var z=Ne(),O=i(Q(z),2),ht=n(O);r(O),M(()=>k(ht,`${t(m).reviewCount??""} reviews`)),x(S,z)};R(V,S=>{t(m).reviewCount&&S(yt)})}r(gt);var Y=i(gt,2),A=n(Y,!0);r(Y);var J=i(Y,2);{var D=S=>{var z=Ee();tt(z,21,()=>t(m).tags.slice(0,4),nt,(O,ht)=>{var b=Pe(),Xt=n(b,!0);r(b),M(()=>k(Xt,t(ht))),x(O,b)}),r(z),x(S,z)};R(J,S=>{t(m).tags.length>0&&S(D)})}r(ft);var st=i(ft,2),_t=n(st);{let S=g(()=>{var b;return((b=t(W))==null?void 0:b.novelty)??0}),z=g(()=>{var b;return((b=t(W))==null?void 0:b.arousal)??0}),O=g(()=>{var b;return((b=t(W))==null?void 0:b.reward)??0}),ht=g(()=>{var b;return((b=t(W))==null?void 0:b.attention)??0});$t(_t,{get novelty(){return t(S)},get arousal(){return t(z)},get reward(){return t(O)},get attention(){return t(ht)},size:"sm"})}r(st),r(X),Ft(X,(S,z)=>{var O;return(O=Et)==null?void 0:O(S,z)},()=>({delay:t(xt)*45})),M(S=>{ae(E,`background: ${(oe[t(m).nodeType]||"#8B95A5")??""}`),k(B,t(m).nodeType),k(U,`${S??""}% retention`),k(A,t(m).content)},[()=>(t(m).retentionStrength*100).toFixed(0)]),Ct("click",X,()=>Mt(t(m).id)),x(v,X)}),r(a),x(e,a)};R(Ht,e=>{t(lt)?e(Kt):t(L).length===0?e(Gt,1):e(Wt,!1)})}r(mt),Ft(mt,e=>{var a;return(a=Et)==null?void 0:a(e)}),r(G),M(e=>{s.disabled=e,k(c,t($)?"Scoring…":"Score Importance")},[()=>t($)||!t(f).trim()]),Ct("keydown",l,Pt),re(l,()=>t(f),e=>F(f,e)),Ct("click",s,at),Ct("click",qt,dt),x(o,G),Dt()}te(["keydown","click"]);export{ea as component};
|