mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-24 23:41:01 +02:00
Full multi-team audit of the living-field work (adversarial fleet + fresh-eyes pass + foundation deep-dive). 11 real bugs found and fixed; 7 false positives adversarially refuted. All re-verified live on the real brain. Pick contract: field cells were unclickable in intentions/schedule/memory-prs/ importance — the click handlers read the old text-item id off a node payload. Read the id from either shape; importance now also picks the field pass; intentions gets a dedicated filter toggle instead of flipping the filter on every click. RouteStage now picks passes top-down (front-rendered text before back-rendered field) so a background cell can't steal a foreground control's click. Proven live: cell clicks fire real promote/act with real memory ids. Empty data: /patterns went black when the cross-project set is empty (it is recomputed). Seeded a real memory-pool substrate it falls back to, like contradictions — alive at zero patterns. Correctness: memories unsuppress now honors UnsuppressResult.stillSuppressed (compounded suppression stays scarred). LivingFieldPass no longer writes the shared params[2] node_count lane (was corrupting the co-resident scene renderer on graph/observatory/memories). Finite-guard every value reaching the GPU buffer so a bad mapper can't NaN-out the field. blackbox selected-cell highlight tracks selectedRunId. graph nulls its field handle when leaving field mode. Accessibility: /memories and /importance (direct ObservatoryCanvas mounts) now honor prefers-reduced-motion via engine.setPaused — the field freezes for reduce-motion users. Gate pins reducedMotion:'no-preference' so the motion assertion is stable. Gates green: check 0/0, build ok, palace-launch-gate 22/22 + curated tour, all-routes-smoke 20/20, ChangelogResponse gains totalEvents. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
import"../chunks/Bzak7iHL.js";import{d as re,o as ie,a as oe,b as q,e as le}from"../chunks/DAau0uzT.js";import{p as se,d as p,e as ae,a as ce,b as ue,h as de,g as r,f as pe,u as he,c as fe,s as l,$ as me,r as xe}from"../chunks/CGq8RnJq.js";import{h as Ee}from"../chunks/De_e6MzK.js";import{b as ge}from"../chunks/Ccqjq5DS.js";import{r as ye}from"../chunks/DJDK-KWF.js";import{a as $}from"../chunks/D35IQVqe.js";import{r as A,O as Re}from"../chunks/BMB5u1EX.js";import{T as Oe}from"../chunks/D7ozXiSB.js";import{L as Ce,F as K,l as Ie}from"../chunks/DETSv_kY.js";var Te=pe('<div class="fixed inset-0 bg-[#020307]"><!></div>');function ke(X,z){se(z,!0);const F=[...A("#22C7DE"),1],Q=[...A("#FF3B30"),.92],y=[...A("#29F2A9"),.62],k=40,D=36,V=-1e5;let u=p(null),c=null,i=null,h=null,v=null,f=p(ae([])),m=p(null),d=p(""),R=p(!0),O=p(null),b=null,C=p(null),I=p(null),T=p(null),E=0;ie(()=>{const e=new URLSearchParams(window.location.search);l(d,e.get("q")??"",!0),U()}),oe(()=>{i==null||i.dispose(),h==null||h.dispose(),i=null,h=null,c=null});async function P(e){c=e;const t=new Ce(e);h=t,t.setCells(W()),e.addPass(t);const n=new Oe(e);i=n,await n.init(),n.setText(S()),e.addPass(n),e.demoClock.reset()}function H(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=280)return t;const n=t.slice(0,280),o=n.lastIndexOf(" ");return o>200?n.slice(0,o):n}function G(){try{ye(`?q=${encodeURIComponent(r(d))}`,{})}catch(e){console.warn("[explore] URL sync failed — walk state is not shareable:",e)}}async function U(){var t;const e=++E;if(l(O,null),!r(d).trim())try{const n=await $.memories.list({limit:"1"});if(e!==E)return;const o=(t=n.memories)==null?void 0:t[0];o!=null&&o.content&&(l(d,H(o.content),!0),l(T,o.id,!0),l(I,o.id.slice(0,8),!0),G())}catch{}if(!r(d).trim()){l(R,!1),l(m,null),l(f,[],!0),i==null||i.setText(S()),c==null||c.demoClock.reset();return}l(R,!0),i==null||i.setText(S());try{const n=r(T)?await $.explore(r(T),"associations",void 0,k):await $.search(r(d),k);if(e!==E)return;l(m,"query"in n?n:null,!0),l(f,n.results,!0)}catch(n){if(e!==E)return;l(m,null),l(f,[],!0),l(O,n instanceof Error?n.message:"UNKNOWN EXPLORE FETCH ERROR",!0)}finally{e===E&&(l(R,!1),l(C,null),i==null||i.setText(S()),h==null||h.setCells(W()),c==null||c.demoClock.reset())}}function W(){const e=r(f).map((t,n)=>({id:t.id,score:N(t),hue:n===0?K.oxygen:K.bridge,energy:N(t),metric2:L(t),selected:n===0,kind:"explore-neighbor",payload:t}));return Ie(e,{maxRadius:.9,minCellR:.035,maxCellR:.1})}function w(e){return e.replace(/[\u2014\u2013]/g,"-").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2026/g,"...").replace(/[^\x20-\x7E]/g,"?")}function B(e){return Math.min(1,Math.max(0,Number.isFinite(e)?e:.5))}function g(e,t=.5){return typeof e=="number"&&Number.isFinite(e)?e:t}function N(e){return B(g(e.similarity,g(e.score,g(e.relevance,g(e.combinedScore,e.retrievalStrength)))))}function L(e){return B(g(e.retention,e.retentionStrength))}function j(e){const t=w(e.content).replace(/\s+/g," ").trim().slice(0,52);return w(`${t} | ${e.id.slice(0,8)} | ${Math.round(N(e)*100)}% | ${Math.round(L(e)*100)}%`)}function M(e,t=y){return{id:"explore:status",kind:"explore-status",text:w(e),x:-.58,y:.02,size:.044,color:t,depth:.78,weight:.62,revealSpan:32,maxWidthEm:50}}function S(){var s;if(r(R))return[M(r(C)?`WALKING FROM ${r(C)}...`:"LOADING SEARCH NEIGHBORS...",F)];if(r(O))return[M(`ERROR - ${r(O)}`.slice(0,72),Q)];if(r(f).length===0){if(!r(d).trim())return[M("SEMANTIC EXPEDITION - EMPTY BRAIN, INGEST A MEMORY TO EXPLORE",y)];const a=(s=r(m))!=null&&s.query?`NO NEIGHBORS FOR "${r(m).query}" | ${r(m).durationMs}ms`:`NO NEIGHBORS FOR "${r(d)}"`;return[M(a,y)]}const e=r(f).slice(0,D),t=.72,n=1.5/Math.max(1,D-1);return[{id:"explore:origin",kind:"explore-origin",text:w(r(I)?`EXPEDITION SEEDED FROM NEWEST MEMORY ${r(I)} - CLICK ANY THOUGHT TO WALK`:`SEMANTIC NEIGHBORHOOD - ${e.length} THOUGHTS - CLICK TO WALK`),x:-.88,y:.82,size:.022,color:y,depth:.85,weight:.6,revealSpan:24,maxWidthEm:60},...e.map((a,Y)=>({id:`explore:${a.id}`,kind:"explore-neighbor",memoryId:a.id,text:j(a),x:-.88,y:t-Y*n,size:.026,color:F,depth:N(a),weight:L(a),startFrame:V+Y*2,revealSpan:20,maxWidthEm:46,hitPadX:.03,hitPadY:.015}))]}function _(e){if(!r(u))return null;const t=r(u).getBoundingClientRect();return t.width<=0||t.height<=0?null:{x:(e.clientX-t.left)/t.width*2-1,y:-((e.clientY-t.top)/t.height*2-1)}}function J(e){if(!r(u)||!c)return;const t=r(u).getBoundingClientRect(),n=Math.max(1e-4,t.width/Math.max(1,t.height)),o={x:e.x*Math.max(n,1),y:e.y/Math.min(n,1)},s=v??o,a={x:s.x+(o.x-s.x)*.35,y:s.y+(o.y-s.y)*.35};v=a,c.setCursorPreNdc(a.x,a.y,a.x-s.x,a.y-s.y)}function Z(e){const t=_(e);if(!t)return;J(t);const n=(i==null?void 0:i.pickAt(t.x,t.y))??null,o=(n==null?void 0:n.kind)==="explore-neighbor"?n.id:null;o!==b&&(b=o,i==null||i.setRunDepth(o,1)),r(u)&&(r(u).style.cursor=o?"crosshair":"default")}function ee(){v=null,b=null,c==null||c.setCursorPreNdc(999,999,0,0),i==null||i.setRunDepth(null),r(u)&&(r(u).style.cursor="default")}async function te(e){const t=_(e);if(!t||!i)return;const n=i.pickAt(t.x,t.y);if((n==null?void 0:n.kind)!=="explore-neighbor")return;const o=n.payload;if(!o.memoryId)return;const s=r(f).find(a=>a.id===o.memoryId);s!=null&&s.content&&(l(C,s.id.slice(0,8),!0),l(T,s.id,!0),l(I,null),l(d,H(s.content),!0),G(),await U())}var x=Te();Ee("15rowvt",e=>{de(()=>{me.title="Explore · Vestige"})});var ne=fe(x);{let e=he(()=>{var t;return`real-explore-neighbors:${r(d)}:${((t=r(m))==null?void 0:t.total)??0}`});Re(ne,{demo:"recall-path",get seed(){return r(e)},onready:P})}xe(x),ge(x,e=>l(u,e),()=>r(u)),q("pointerdown",x,te),q("pointermove",x,Z),le("pointerleave",x,ee),ce(X,x),ue()}re(["pointerdown","pointermove"]);export{ke as component};
|