vestige/apps/dashboard/build/_app/immutable/chunks/D35IQVqe.js
Sam Valladares 844b91a804 feat(dashboard): every organ is a living WebGPU field (LivingFieldPass)
Turn all 17 sparse organs from text-on-black voids into full-bleed, moving,
bioluminescent WebGPU fields. Each cell maps to a real backend fact; verified
live on the real brain with a decoded fill% + motion + zero-error probe.

Foundation: one reusable LivingFieldPass (src/lib/observatory/field/) does
splat -> separable-blur (render passes) -> membrane base coat -> HDR cells with
orbital drift and a CPU pick-mirror. Each organ writes a ~20-line data->cells
mapper (cell-layout.ts: layoutGalaxy / layoutRings / FIELD_HUE).

Organs brought alive (fill% before -> after, all zero WebGPU errors):
stats 0.8->80.9, observatory 10.8->81.4, graph 12.3->82.4, memories ->78.4,
blackbox 18.2->83.3, contradictions 1.6->69.6, dreams 0.3->64.5,
settings 2.7->76.4, reasoning 2.7->39.2, patterns 7.1->45.6,
activation 10->64.9, feed ->89, explore ->83.3, intentions ->66.6,
importance ->73.7, memory-prs ->74.4, schedule ->37.1.

Backend surfaces: add api.memoryChangelog() + ChangelogResponse; surface
suppress/unsuppress on the memories field (shift/alt-click -> scar).

Tests: palace-launch-gate now asserts fillPct>30 + isAnimating (not just
non-black), with a longer settle for reasoning's deep_reference and a raised
timeout for the curated tour. all-routes-smoke treats settings as the WebGPU
field it now is. Gates green: check 0/0, build ok, palace-launch-gate 22/22 +
tour, all-routes-smoke 20/20.

Protected work untouched: MemoryCinema, graph/cinema, observatory scene
shaders, node-renderer, palace-map.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 06:20:35 +07:00

1 line
2.8 KiB
JavaScript

const s="/api";async function t(e,o){const r=await fetch(`${s}${e}`,{headers:{"Content-Type":"application/json"},...o});if(!r.ok)throw new Error(`API ${r.status}: ${r.statusText}`);return r.json()}const n={memories:{list:e=>{const o=e?"?"+new URLSearchParams(e).toString():"";return t(`/memories${o}`)},get:e=>t(`/memories/${e}`),delete:e=>t(`/memories/${e}`,{method:"DELETE"}),promote:e=>t(`/memories/${e}/promote`,{method:"POST"}),demote:e=>t(`/memories/${e}/demote`,{method:"POST"}),suppress:(e,o)=>t(`/memories/${e}/suppress`,{method:"POST",body:o?JSON.stringify({reason:o}):void 0}),unsuppress:e=>t(`/memories/${e}/unsuppress`,{method:"POST"})},search:(e,o=20)=>t(`/search?q=${encodeURIComponent(e)}&limit=${o}`),stats:()=>t("/stats"),health:()=>t("/health"),timeline:(e=7,o=200)=>t(`/timeline?days=${e}&limit=${o}`),graph:e=>{const o=e?"?"+new URLSearchParams(Object.entries(e).filter(([,r])=>r!==void 0).map(([r,i])=>[r,String(i)])).toString():"";return t(`/graph${o}`)},dream:()=>t("/dream",{method:"POST"}),explore:(e,o="associations",r,i=10)=>t("/explore",{method:"POST",body:JSON.stringify({from_id:e,action:o,to_id:r,limit:i})}),predict:()=>t("/predict",{method:"POST"}),importance:e=>t("/importance",{method:"POST",body:JSON.stringify({content:e})}),consolidate:()=>t("/consolidate",{method:"POST"}),retentionDistribution:()=>t("/retention-distribution"),memoryChangelog:(e=100)=>t(`/changelog?limit=${e}`),duplicates:(e=.8,o=20)=>t(`/duplicates?threshold=${e}&limit=${o}`),contradictions:e=>{const o=e?"?"+new URLSearchParams(Object.entries(e).filter(([,r])=>r!==void 0).map(([r,i])=>[r,String(i)])).toString():"";return t(`/contradictions${o}`)},crossProjectPatterns:()=>t("/patterns/cross-project"),memoryAudit:(e,o=100)=>t(`/memories/${encodeURIComponent(e)}/audit?limit=${o}`),intentions:(e="active")=>t(`/intentions?status=${e}`),deepReference:(e,o=20)=>t("/deep_reference",{method:"POST",body:JSON.stringify({query:e,depth:o})}),sanhedrin:{latest:()=>t("/sanhedrin/latest"),telemetry:(e=7)=>t(`/sanhedrin/telemetry?days=${e}`),appeal:(e,o,r,i)=>t("/sanhedrin/appeal",{method:"POST",body:JSON.stringify({reason:e,note:o,claimId:r,receiptId:i})})},traces:{list:(e=50)=>t(`/traces?limit=${e}`),get:e=>t(`/traces/${encodeURIComponent(e)}`),exportUrl:e=>`${s}/traces/${encodeURIComponent(e)}/export`},receipts:{list:(e=50)=>t(`/receipts?limit=${e}`),listForRun:(e,o=50)=>t(`/receipts?run=${encodeURIComponent(e)}&limit=${o}`),get:e=>t(`/receipts/${encodeURIComponent(e)}`)},memoryPrs:{list:(e,o=100)=>{const r=new URLSearchParams;return e&&r.set("status",e),r.set("limit",String(o)),t(`/memory-prs?${r.toString()}`)},get:e=>t(`/memory-prs/${encodeURIComponent(e)}`),act:(e,o)=>t(`/memory-prs/${encodeURIComponent(e)}/${o}`,{method:"POST"}),getMode:()=>t("/memory-prs/mode"),setMode:e=>t("/memory-prs/mode",{method:"POST",body:JSON.stringify({mode:e})})}};export{n as a};