mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-26 23:51:02 +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
7.9 KiB
JavaScript
1 line
7.9 KiB
JavaScript
var Ee=Object.defineProperty;var Ae=(d,e,s)=>e in d?Ee(d,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[e]=s;var N=(d,e,s)=>Ae(d,typeof e!="symbol"?e+"":e,s);import"./Bzak7iHL.js";import{d as be,o as Q,b as $,e as Ne}from"./DAau0uzT.js";import{p as Re,j as ee,g as n,y as _e,Y as ke,a as Se,b as Ce,u as Ie,d as R,f as Me,s as p,c as Pe,r as we}from"./CGq8RnJq.js";import{s as Oe}from"./uCQU803Y.js";import{b as Le}from"./Ccqjq5DS.js";import{p as _,s as He,a as Ve}from"./DV6OI5iy.js";import{g as Fe}from"./DJDK-KWF.js";import{b as T}from"./DY7cP31Q.js";import{p as De}from"./CbBCXwzm.js";import{r as m,C as re,R as S,M as Te,I as te,O as ze}from"./BMB5u1EX.js";import{T as ne}from"./D7ozXiSB.js";const Ue=[{href:"/observatory",label:"Observatory",shortcut:"O"},{href:"/graph",label:"Graph",shortcut:"G"},{href:"/memories",label:"Memories",shortcut:"M"},{href:"/timeline",label:"Timeline",shortcut:"T"},{href:"/feed",label:"Feed",shortcut:"F"},{href:"/explore",label:"Explore",shortcut:"E"},{href:"/reasoning",label:"Reasoning",shortcut:"R"},{href:"/stats",label:"Stats",shortcut:"S"},{href:"/settings",label:"Settings",shortcut:","}],M=-.93,P=.83,z=.024,U=.058,Ge=-.965,Xe=-.9,Ye=-.4,We=.92,Be=-.73,Ke=-.44,Ze=.96,G=[...m(re.forward),1],je=[...m(S.luciferin),1],qe=[...m(S.bridge),.36],Je=[...m(S.bridge),.36],Qe=[...m(Te.blackwater),.15];function $e(d,e={}){return new et(d,e)}class et{constructor(e,s){N(this,"text");N(this,"routes");N(this,"activePath");N(this,"hoverHref",null);N(this,"expanded",!1);N(this,"ready",!1);this.text=new ne(e),this.routes=s.routes??Ue,this.activePath=s.activePath??""}async init(){await this.text.init(),this.ready=!0,this.rebuild()}setActivePath(e){this.activePath!==e&&(this.activePath=e,this.rebuild())}setHoverFromNdc(e,s){const l=e<=Xe&&s>=Ye&&s<=We,u=e<=Be&&s>=Ke&&s<=Ze,A=this.expanded?u:l;A!==this.expanded&&(this.expanded=A,A||(this.hoverHref=null),this.rebuild());const x=this.pickAt(e,s),k=(x==null?void 0:x.payload.href)??null;return k!==this.hoverHref&&(this.hoverHref=k,this.rebuild()),x}clearHover(){!this.expanded&&this.hoverHref===null||(this.expanded=!1,this.hoverHref=null,this.rebuild())}pickAt(e,s){const l=this.text.pickAt(e,s);if(!l||l.kind!=="route-nav")return null;const u=l.payload;return u.route?{id:l.id,kind:"route-nav",payload:u.route}:null}render(e){this.text.render(e)}dispose(){this.text.dispose()}rebuild(){this.ready&&this.text.setText(this.expanded?this.buildExpanded():this.buildCollapsed())}buildCollapsed(){return this.routes.map((e,s)=>{const l=this.isActive(e.href),u=e.shortcut??e.label.charAt(0).toUpperCase();return{id:`route-nav-marker:${e.href}`,kind:"route-nav-marker",text:u,x:Ge,y:P-s*U,size:z,color:l?G:Je,startFrame:0,revealSpan:1,maxWidthEm:4}})}buildExpanded(){return[{id:"route-nav:rail",kind:"route-nav-rail",text:"COGNITIVE OS",x:M,y:P+.075,size:.021,color:Qe,revealSpan:1},...this.routes.map((e,s)=>{const l=this.isActive(e.href),u=this.hoverHref===e.href,A=l?G:u?je:qe,x=l?">":u?"+":"-",k=e.shortcut?` ${e.shortcut}`:"";return{id:`route-nav:${e.href}`,kind:"route-nav",text:`${x} ${e.label.toUpperCase()}${k}`,x:l||u?M+.012:M,y:P-s*U,size:l||u?z*1.06:z,color:A,startFrame:0,revealSpan:1,maxWidthEm:16,hitPadX:.03,hitPadY:.02,route:e}}),...this.hoverHref?[{id:"route-nav:hover-ring",kind:"route-nav-focus",text:">>>>>>>>>>>>>>>>",x:M-.01,y:P-this.routes.findIndex(e=>e.href===this.hoverHref)*U-.029,size:.012,color:G,revealSpan:1}]:[]]}isActive(e){const s=this.activePath||"";return s===e||s.endsWith(e)||e==="/observatory"&&(s==="/"||s==="")}}function tt(d){return{organ:d,nodes:[],edges:[],events:[],receipts:[],scalars:{},alive:!1}}var rt=Me("<div><!></div>");function mt(d,e){Re(e,!0);const s=()=>Ve(De,"$page",l),[l,u]=He();let A=_(e,"seed",3,"vestige-route-organ-v1"),x=_(e,"scene",3,null),k=_(e,"embedded",3,!1),se=_(e,"demo",3,"recall-path"),ie=_(e,"loading",3,!1),X=_(e,"error",3,null),ae=_(e,"emptyLabel",3,"NO ROUTE DATA IN FIELD"),C=Ie(()=>x()??tt(e.organ)),f=R(null),v=R(null),i=null,o=null,y=[],w=R(0),O=R(0),b=R(!1),L=R(!1),H=R(!1),V=null,F=null;const oe=[...m(re.forward),1],Y=[...m(S.recall),.58],le=[...m(S.luciferin),.86],W=[...m(te.veto),.9],ue=[...m(te.caution),.78];function ce(){if(typeof window>"u")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)");t.matches&&!n(L)&&p(b,!0);const r=a=>{n(L)||p(b,a.matches,!0)};return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}function de(){p(L,!0),p(b,!n(b)),I()}ee(()=>{var t;(t=n(v))==null||t.setPaused(n(b)),I()});function B(t){var r;if(n(v)){for(const a of y)(r=a.uploadScene)==null||r.call(a,t);n(v).demoClock.reset(),I()}}function he(t,r){p(w,t,!0),p(O,r,!0),o==null||o.setActivePath(K()),I(t,r)}async function fe(t){var r;p(H,!1),p(v,t,!0);for(const a of y)(r=a.dispose)==null||r.call(a);i==null||i.dispose(),o==null||o.dispose(),y=typeof e.passes=="function"?e.passes(t,n(C)):e.passes??[];for(const a of y)t.addPass(a);o=$e(t,{activePath:K()}),i=new ne(t),t.addPass(o),t.addPass(i),await Promise.all([o.init(),i.init()]),n(v)===t&&(p(H,!0),B(n(C)))}ee(()=>{const t=n(C);!n(v)||!n(H)||_e(()=>B(t))});function K(){const t=s().url.pathname;return t.startsWith(T)?t.slice(T.length)||"/":t}function Z(t){return t.replace(/[—–]/g,"-").replace(/[‘’]/g,"'").replace(/[“”]/g,'"').replace(/…/g,"...").replace(/[^\x20-\x7E]/g,"?")}function pe(t=n(w),r=n(O)){const a=[{id:"route-chrome:pause",kind:"route-chrome",text:n(b)?"> RESUME":"|| PAUSE",x:.66,y:-.86,size:.034,color:n(b)?ue:oe,revealSpan:1},{id:"route-chrome:telemetry",kind:"route-telemetry",text:`${e.organ.toUpperCase()} - ${t}F - ${r}FPS`,x:.44,y:.88,size:.022,color:Y,revealSpan:1}];return ie()?a.push({id:"route-chrome:loading",kind:"route-status",text:"REPLAYING COGNITIVE RECEIPT...",x:-.23,y:.02,size:.046,color:le,startFrame:Math.max(0,t-90),revealSpan:72}):X()?a.push({id:"route-chrome:error-pulse",kind:"route-status-pulse",text:"!!!!!!!!!!!!!!!!!!!!!!!!",x:-.36,y:-.035,size:.025,color:W,revealSpan:1},{id:"route-chrome:error",kind:"route-status",text:Z(`ERROR - ${X()}`).slice(0,72),x:-.54,y:.025,size:.032,color:W,revealSpan:14,maxWidthEm:48}):n(C).alive||a.push({id:"route-chrome:empty",kind:"route-status",text:Z(ae()),x:-.36,y:.02,size:.034,color:Y,revealSpan:24,maxWidthEm:48}),a}function I(t=n(w),r=n(O)){i==null||i.setText(pe(t,r))}function j(t){if(!n(f))return null;const r=n(f).getBoundingClientRect();return r.width===0||r.height===0?null:{x:(t.clientX-r.left)/r.width*2-1,y:-((t.clientY-r.top)/r.height*2-1)}}function me(t){if(!n(f)||!n(v))return;const r=n(f).getBoundingClientRect();if(r.width===0||r.height===0)return;const a=Math.max(1e-4,r.width/Math.max(1,r.height)),h={x:t.x*Math.max(a,1),y:t.y/Math.min(a,1)},c=V??h,E={x:c.x+(h.x-c.x)*.35,y:c.y+(h.y-c.y)*.35};V=E,n(v).setCursorPreNdc(E.x,E.y,E.x-c.x,E.y-c.y)}function ve(t){const r=j(t);if(!r)return;me(r);const a=o==null?void 0:o.setHoverFromNdc(r.x,r.y),h=i==null?void 0:i.pickAt(r.x,r.y),c=(h==null?void 0:h.id)??null;c!==F&&(F=c,i==null||i.setRunDepth(c,1)),n(f)&&(n(f).style.cursor=a||h||e.onpick?"crosshair":"default")}function xe(){var t;o==null||o.clearHover(),F=null,i==null||i.setRunDepth(null),V=null,(t=n(v))==null||t.setCursorPreNdc(999,999,0,0),n(f)&&(n(f).style.cursor="default")}async function ye(t){var c,E,q;const r=j(t);if(!r)return;const a=(o==null?void 0:o.pickAt(r.x,r.y))??null;if(a){await Fe(`${T}${a.payload.href}`);return}const h=i==null?void 0:i.pickAt(r.x,r.y);if((h==null?void 0:h.id)==="route-chrome:pause"){de();return}for(let D=y.length-1;D>=0;D--){const J=await((E=(c=y[D]).pickAt)==null?void 0:E.call(c,r.x,r.y));if(J){(q=e.onpick)==null||q.call(e,J);return}}}Q(()=>()=>{var t;for(const r of y)(t=r.dispose)==null||t.call(r);i==null||i.dispose(),o==null||o.dispose(),y=[],i=null,o=null}),Q(()=>ce());var g=rt(),ge=Pe(g);ze(ge,{get demo(){return se()},get seed(){return A()},onframe:he,onready:fe}),we(g),Le(g,t=>p(f,t),()=>n(f)),ke(()=>Oe(g,1,`${k()?"absolute":"fixed"} inset-0 overflow-hidden`)),$("click",g,ye),$("pointermove",g,ve),Ne("pointerleave",g,xe),Se(d,g),Ce(),u()}be(["click","pointermove"]);export{mt as R,tt as e};
|