HirModel/resonant-access-body-web-runtime
0
1<!DOCTYPE html>2<html lang="en">3<head>4<meta charset="utf-8" />5<meta name="viewport" content="width=device-width, initial-scale=1" />6<title>Resonant Access Body/Web Runtime v0.1.2 — Mycelial Globe + Body Runtime Pressure Map</title>7<style>8 :root{9 --bg:#05070d;10 --panel:#0b1020cc;11 --panel2:#10172bcc;12 --line:#24324f;13 --text:#e7eefc;14 --muted:#9aa9c7;15 --gold:#f5c85b;16 --blue:#69d7ff;17 --blue2:#b9f3ff;18 --green:#74f6a7;19 --yellow:#ffe071;20 --red:#ff5a76;21 --purple:#c18cff;22 --gray:#7a8498;23 }24 *{box-sizing:border-box}25 html,body{margin:0;min-height:100%;background:radial-gradient(circle at 20% 0%,#101a34 0,#070a13 34%,#03050a 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}26 body{padding:18px;}27 .shell{max-width:1440px;margin:0 auto;}28 header{border:1px solid #243350;background:linear-gradient(135deg,#0a1020e8,#10162be0 55%,#0b1020d8);border-radius:24px;padding:22px 24px;box-shadow:0 18px 80px #0009;position:relative;overflow:hidden;}29 header:before{content:"";position:absolute;inset:-70%;background:radial-gradient(circle,#68d9ff1f 0,#0000 34%);animation:slowSpin 24s linear infinite;}30 @keyframes slowSpin{to{transform:rotate(360deg)}}31 header>*{position:relative;z-index:1}32 h1{margin:0;font-size:clamp(26px,4vw,48px);line-height:1.02;letter-spacing:-.04em;}33 h2{margin:0 0 10px;font-size:22px;letter-spacing:-.02em;}34 h3{margin:0 0 8px;font-size:15px;text-transform:uppercase;letter-spacing:.12em;color:#b6c7eb;}35 .subtitle{margin:10px 0 0;color:#c6d6f5;font-size:16px;max-width:940px;line-height:1.55;}36 .locks{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}37 .chip{border:1px solid #33466b;background:#101b33c9;color:#cfe0ff;border-radius:999px;padding:8px 12px;font-size:13px;}38 .chip.gold{border-color:#b68c30;background:#3a2c1022;color:#ffe19d}39 .chip.green{border-color:#2f9b64;background:#10332155;color:#a5ffc8}40 .chip.red{border-color:#a43d50;background:#35101b55;color:#ffb1bf}41 .boundaryBanner{margin-top:16px;border:1px solid #5f6f92;background:linear-gradient(135deg,#0c1627,#111d33);border-radius:18px;padding:12px 14px;color:#e6f1ff;line-height:1.55;font-size:14px;box-shadow:inset 0 0 0 1px #ffffff08}42 .boundaryBanner b{color:#fff0b8}43 .instrumentDesc{margin:0 0 12px;border:1px solid #2d4268;background:#061226;border-radius:16px;padding:12px 14px;color:#d8eaff;font-size:13px;line-height:1.55}44 .grid{display:grid;grid-template-columns:390px minmax(0,1fr) 390px;gap:16px;margin-top:16px;align-items:start;}45 @media(max-width:1180px){.grid{grid-template-columns:1fr}.canvasCard{order:-1}}46 .card{border:1px solid #243350;background:var(--panel);border-radius:22px;padding:16px;box-shadow:0 15px 45px #0006;backdrop-filter:blur(12px);}47 .card.soft{background:var(--panel2)}48 .small{font-size:12px;color:var(--muted);line-height:1.5}49 .bodyText{font-size:14px;line-height:1.55;color:#dce8ff;}50 .tabs{display:flex;gap:8px;margin:16px 0 0;flex-wrap:wrap}51 button,.btn{border:1px solid #31456b;background:linear-gradient(180deg,#17233d,#0d172b);color:#e9f3ff;border-radius:14px;padding:10px 12px;font-weight:700;cursor:pointer;transition:.16s ease;box-shadow:inset 0 0 0 1px #ffffff08,0 10px 25px #0005;}52 button:hover{transform:translateY(-1px);border-color:#68d9ff99;box-shadow:0 0 28px #68d9ff18,0 12px 26px #0007}53 button.active{border-color:#74f6a7;background:linear-gradient(180deg,#17372b,#0c201a);color:#cbffe0}54 button.warn{border-color:#ffcf6a88;color:#ffe5ad;background:linear-gradient(180deg,#3d2b12,#1d160d)}55 button.danger{border-color:#ff5a7688;color:#ffc4ce;background:linear-gradient(180deg,#3a1220,#1a0c12)}56 input,select,textarea{width:100%;border:1px solid #2b3d5d;background:#060b16;color:#e6f1ff;border-radius:14px;padding:10px 12px;font:inherit;outline:none;}57 textarea{min-height:96px;resize:vertical;line-height:1.45;}58 label{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#9eb0d1;margin:12px 0 6px;}59 .row{display:grid;grid-template-columns:1fr 70px;gap:8px;align-items:center;margin:8px 0;}60 input[type=range]{accent-color:#69d7ff;padding:0}61 .value{font-variant-numeric:tabular-nums;color:#d8e8ff;text-align:right;font-size:13px}62 .metric{display:grid;grid-template-columns:1fr auto;gap:8px;border-bottom:1px solid #22304c;padding:8px 0;font-size:13px;}63 .metric:last-child{border-bottom:0}64 .state{font-weight:900;letter-spacing:.08em;text-transform:uppercase;}65 .state.held{color:var(--green)}.state.strained{color:var(--yellow)}.state.stop{color:var(--red)}66 .canvasWrap{position:relative;background:radial-gradient(circle at 50% 43%,#10203d 0,#071020 40%,#02040a 100%);border-radius:26px;overflow:hidden;border:1px solid #284060;box-shadow:inset 0 0 80px #69d7ff14,0 20px 70px #0008;}67 canvas{display:block;width:100%;height:auto;aspect-ratio:900/620;min-height:360px;}68 .hud{position:absolute;top:14px;left:14px;right:14px;display:flex;gap:8px;flex-wrap:wrap;pointer-events:none;}69 .hud .pill{background:#020711b8;border:1px solid #2d4268;border-radius:999px;padding:7px 10px;color:#dcecff;font-size:12px;box-shadow:0 10px 30px #0007;}70 .hud .pill.held{border-color:#2f9b64;background:#0d2b1db8;color:#c8ffdd}71 .hud .pill.strained{border-color:#c49b34;background:#33240ab8;color:#ffe7a5}72 .hud .pill.stop{border-color:#a43d50;background:#36101bb8;color:#ffc0cc}73 .canvasCaption{position:absolute;left:16px;bottom:14px;right:16px;border:1px solid #2d4268;background:#020711b8;border-radius:14px;padding:8px 10px;color:#b9c7e2;font-size:12px;line-height:1.35;pointer-events:none;}74 .legend{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px;font-size:12px;color:#b9c7e2}.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px;vertical-align:-1px}.gold{background:var(--gold)}.blue{background:var(--blue)}.green{background:var(--green)}.yellow{background:var(--yellow)}.red{background:var(--red)}.purple{background:var(--purple)}75 .panels{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.panel{border:1px solid #243350;background:#080d19cc;border-radius:18px;padding:14px;}76 @media(max-width:900px){.panels{grid-template-columns:1fr}}77 pre{white-space:pre-wrap;word-break:break-word;background:#050914;border:1px solid #223251;border-radius:16px;padding:12px;color:#d9e8ff;max-height:340px;overflow:auto;font-size:12px;line-height:1.45;}78 .hidden{display:none!important}.footer{margin:16px 0 0;color:#8fa1c0;font-size:12px;text-align:center}.modeNote{border-left:3px solid #69d7ff;padding:10px 12px;background:#061226;border-radius:12px;margin-top:12px;color:#d8eaff;font-size:13px;line-height:1.5;}79 .pictureGuide{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:8px}.picCard{border:1px solid #2c3f63;background:#081226;border-radius:16px;padding:10px;text-align:center;min-height:94px}.picCard .emoji{font-size:24px}.picCard b{display:block;margin:5px 0 2px}.picCard span{font-size:11px;color:#aab9d4}80 @media(max-width:900px){.pictureGuide{grid-template-columns:repeat(2,1fr)}}81</style>82</head>83<body>84<div class="shell">85 <header>86 <h1>Resonant Access Body/Web Runtime v0.1.2</h1>87 <p class="subtitle"><b>Resonant Mycelial Globe</b> + <b>Body Runtime Pressure Map</b>. A first offline HTML prototype for pressure-mapped coupling, embodied signal routing, HIR/OAM gates, return-to-substrate, and bounded trace export <b>(symbolic prototype only)</b>.</p>88 <div class="locks">89 <span class="chip gold">Symbolic only — tune, don’t capture</span>90 <span class="chip green">No grab: couple, witness, return</span>91 <span class="chip">Symbolic tracer, not whole pattern</span>92 <span class="chip">Pressure gives direction</span>93 <span class="chip">Growth only after return</span>94 <span class="chip red">Not diagnosis / not proof</span>95 </div>96 <div class="boundaryBanner"><b>Bounded symbolic prototype:</b> this instrument visualizes pressure, coupling, witness, return, and overload. It does not access hidden data, route packets, locate people, diagnose bodies, prove truth, or certify consciousness/life.</div>97 </header>98 99 <div class="tabs">100 <button id="tabGlobe" class="active" onclick="setInstrument('globe')">Resonant Mycelial Globe</button>101 <button id="tabBody" onclick="setInstrument('body')">Body Runtime Pressure Map</button>102 <button onclick="runDemo()">Run Demo Sequence</button>103 <button onclick="resetAll()" class="warn">Reset</button>104 <button onclick="exportJSON()">Export Trace JSON</button>105 </div>106 107 <div id="instrumentDescription" class="instrumentDesc" style="margin-top:16px"></div>108 109 <div class="grid">110 <section class="card">111 <h2>Intake + Guide</h2>112 <label>Guide Mode</label>113 <select id="guideMode" onchange="updateGuide()">114 <option value="systems">Systems Guide</option>115 <option value="plain" selected>Plain Guide</option>116 <option value="picture">Picture Guide</option>117 <option value="child">Child + Parent Guide</option>118 </select>119 <div id="guideText" class="modeNote"></div>120 <div id="pictureGuide" class="pictureGuide hidden">121 <div class="picCard"><div class="emoji">👀</div><b>Look</b><span>What is here?</span></div>122 <div class="picCard"><div class="emoji">🧠</div><b>Think</b><span>What might it mean?</span></div>123 <div class="picCard"><div class="emoji">❓</div><b>Wonder</b><span>What do we not know?</span></div>124 <div class="picCard"><div class="emoji">🛑</div><b>Careful</b><span>What should we not say?</span></div>125 <div class="picCard"><div class="emoji">🤝</div><b>Ask</b><span>Who can help check?</span></div>126 <div class="picCard"><div class="emoji">🛠</div><b>Fix</b><span>What needs correction?</span></div>127 <div class="picCard"><div class="emoji">🍃</div><b>Let Go</b><span>What should not be kept?</span></div>128 </div>129 130 <label>Input Type</label>131 <select id="inputType" onchange="pressureMap()">132 <option value="text">Text / claim</option>133 <option value="image">Image / screenshot / diagram</option>134 <option value="equation">Equation / formal model</option>135 <option value="mixed">Mixed artifact</option>136 <option value="body">Body signal</option>137 </select>138 139 <label>Purpose</label>140 <select id="purpose" onchange="pressureMap()">141 <option value="understand">Understand honestly</option>142 <option value="translate">Translate into trace packet</option>143 <option value="pressure">Pressure-read / HIR-OAM gate</option>144 <option value="renderer">Prepare symbolic renderer mapping</option>145 <option value="body">Map body-runtime processing</option>146 </select>147 148 <label>Artifact / Tune Request</label>149 <textarea id="artifactText" oninput="pressureMap()">What am I trying to understand, through what tracer, with what boundary?</textarea>150 151 <label>Boundary / What should not be claimed?</label>152 <textarea id="boundaryText" oninput="pressureMap()">Do not treat the trace as proof, diagnosis, hidden location, identity, consciousness, or whole-pattern capture.</textarea>153 154 <label>Pressure Controls</label>155 <div class="row"><input id="tune" type="range" min="0" max="100" value="82" oninput="pressureMap()"><span class="value" id="tuneVal"></span></div>156 <div class="small"><b>Tune clarity:</b> how clearly the user states what they are trying to understand.</div>157 <div class="row"><input id="fit" type="range" min="0" max="100" value="78" oninput="pressureMap()"><span class="value" id="fitVal"></span></div>158 <div class="small"><b>Tracer fit / signal fit:</b> how well the artifact, tracer, or body-channel signal matches the request.</div>159 <div class="row"><input id="boundary" type="range" min="0" max="100" value="88" oninput="pressureMap()"><span class="value" id="boundaryVal"></span></div>160 <div class="small"><b>Boundary safety / respect:</b> how clearly unsupported claims are blocked and agency is preserved.</div>161 <div class="row"><input id="return" type="range" min="0" max="100" value="84" oninput="pressureMap()"><span class="value" id="returnVal"></span></div>162 <div class="small"><b>Source-return / loop completion:</b> whether the interpretation returns to source, uncertainty, repair, and release instead of closing too early.</div>163 <div class="row"><input id="oam" type="range" min="0" max="100" value="10" oninput="pressureMap()"><span class="value" id="oamVal"></span></div>164 <div class="small"><b>OAM load / overload pressure:</b> pressure from ambiguity, overclaim, hidden inference, strain, or unresolved risk.</div>165 166 <div class="tabs">167 <button onclick="emitTune()">Emit Tune Signal</button>168 <button id="returnBtn" onclick="completeReturn()">Complete Return</button>169 </div>170 </section>171 172 <section class="canvasCard card soft">173 <div class="canvasWrap">174 <canvas id="mainCanvas" width="900" height="620"></canvas>175 <div class="hud">176 <span class="pill" id="instrumentHud">Globe Mode</span>177 <span class="pill held" id="stateHud">State: HELD</span>178 <span class="pill" id="routeHud">Route: SIM_ROUTE_RESONANT_ACCESS_HELD</span>179 <span class="pill" id="phaseHud">Phase: IDLE</span>180 </div>181 <div class="canvasCaption" id="canvasCaption">Symbolic coupling map. Not geolocation. Not packet routing.</div>182 </div>183 <div class="legend">184 <span><i class="dot gold"></i>HIR-held / integrated</span>185 <span><i class="dot blue"></i>Return / repair</span>186 <span><i class="dot green"></i>Legitimate coupling</span>187 <span><i class="dot yellow"></i>Strain / uncertainty</span>188 <span><i class="dot red"></i>Must stop / overload</span>189 <span><i class="dot purple"></i>Inference zone</span>190 </div>191 </section>192 193 <section class="card">194 <h2>HIR/OAM Readout</h2>195 <div class="metric"><span>Coupling readiness Cₜ</span><b id="cVal">0.00</b></div>196 <div class="metric"><span>Symbolic loop-growth Gₘ</span><b id="gVal">0.00</b></div>197 <div class="metric"><span>State</span><b id="stateVal" class="state held">HELD</b></div>198 <div class="metric"><span>Route</span><b id="routeVal">SIM_ROUTE_RESONANT_ACCESS_HELD</b></div>199 <div class="metric"><span>Dominant direction</span><b id="directionVal">Translation / boundary</b></div>200 <div class="metric"><span>Loop status</span><b id="loopVal">READY</b></div>201 202 <h3 style="margin-top:18px">Formal Spine</h3>203 <pre id="equations">Cₜ = Tₜ × Fₜ × Bₜ × Rₜ − Pₒₐₘ204Gₘ = N × R_c × L_c − Pₒₐₘ205 206All values are symbolic pressure indicators only.</pre>207 208 <h3>Interpretation</h3>209 <div class="bodyText" id="interpretation"></div>210 </section>211 </div>212 213 <div class="panels">214 <section class="panel">215 <h2>Pre-Coupling Translation</h2>216 <pre id="translationOut"></pre>217 </section>218 <section class="panel">219 <h2>Trace Packet Preview</h2>220 <pre id="jsonOut"></pre>221 </section>222 </div>223 224 <section class="card" style="margin-top:16px">225 <h2>Locked Boundary Notes</h2>226 <p class="bodyText"><b>Resonant Mycelial Globe:</b> symbolic coupling map only. It does not claim real geolocation, packet routes, hidden source location, ownership, proof, life, or consciousness.</p>227 <p class="bodyText"><b>Body Runtime Pressure Map:</b> bounded systems visualization only. It is not medical diagnosis, treatment advice, anatomy precision, clinical protocol, or neuroscience proof.</p>228 <p class="bodyText"><b>Shared lock:</b> Pressure gives the pulse its direction. Coupling gives the trace its boundary. Return gives the field its growth.</p>229 </section>230 <div class="footer">Created and Developed by Collin D. Weber · Primordial Calculus / HIR-OAM · v0.1.2 offline symbolic prototype</div>231</div>232 233<script>234const $ = id => document.getElementById(id);235const canvas = $('mainCanvas');236const ctx = canvas.getContext('2d');237let W=canvas.width,H=canvas.height;238let instrument='globe';239let t=0;240let phase='IDLE';241let phaseStart=0;242let loopCompleted=false;243let lastState={};244let growthPaths=[];245let particles=[];246let returnTimer=null;247let demoTimers=[];248let growthNotice='';249 250const clusters = {251 text:{name:'Text / Claim', angle:-0.35, color:'#f5c85b'},252 image:{name:'Visual Trace', angle:0.55, color:'#74f6a7'},253 equation:{name:'Formal Model', angle:1.55, color:'#c18cff'},254 mixed:{name:'Mixed Artifact', angle:2.55, color:'#69d7ff'},255 body:{name:'Body Runtime', angle:-1.55, color:'#ffb36b'},256 boundary:{name:'Boundary / Release', angle:3.55, color:'#ff5a76'}257};258 259function clamp(x,a=0,b=1){return Math.max(a,Math.min(b,x));}260function val(id){return Number($(id).value)/100;}261function now(){return performance.now()/1000;}262function setInstrument(which){instrument=which; $('tabGlobe').classList.toggle('active',which==='globe'); $('tabBody').classList.toggle('active',which==='body'); $('instrumentHud').textContent = which==='globe'?'Globe Mode':'Body Runtime Mode'; updateInstrumentDescription(); pressureMap();}263function updateGuide(){264 const mode=$('guideMode').value;265 $('pictureGuide').classList.toggle('hidden', mode!=='picture' && mode!=='child');266 const text={267 systems:'Systems Guide: define the pattern sought, tracer accessed, coupling path, witness boundary, uncertainty, retention, release, and HIR/OAM route.',268 plain:'Plain Guide: What are we looking at? What do we know for sure? What are we guessing? What should we not claim? What should we save, fix, or let go?',269 picture:'Picture Guide: use Look → Think → Wonder → Careful → Ask → Fix → Let Go. Same trace discipline, translated into visual steps.',270 child:'Child + Parent Guide: parent/guardian-guided. The tool helps a child notice, ask, check, and describe. It does not tell a child who they are, diagnose, profile, or save private thoughts as authority.'271 };272 $('guideText').textContent=text[mode];273}274 275function updateInstrumentDescription(){276 const globe='<b>Resonant Mycelial Globe:</b> symbolic map of a bounded tune signal coupling with an already-existing tracer. No real routing, scraping, geolocation, hidden capture, or packet tracing.';277 const body='<b>Body Runtime Pressure Map:</b> symbolic body-pressure routing map. Not anatomy, diagnosis, treatment, neuroscience proof, or clinical guidance.';278 $('instrumentDescription').innerHTML = instrument==='globe' ? globe : body;279 $('canvasCaption').textContent = instrument==='globe' ? 'Symbolic coupling map. Not geolocation. Not packet routing.' : 'Symbolic systems view. Not anatomy. Not medical.';280}281 282function pressureMap(){283 ['tune','fit','boundary','return','oam'].forEach(id=>$(id+'Val').textContent=Math.round(val(id)*100)+'%');284 const T=val('tune'), F=val('fit'), B=val('boundary'), R=val('return'), P=val('oam');285 const C=clamp(T*F*B*R - P*0.62, -1, 1);286 const N=(T+F+B)/3, Rc=(B+R)/2, Lc=R;287 const G=clamp(N*Rc*Lc - P*0.55, -1, 1);288 let state='HELD', route='SIM_ROUTE_RESONANT_ACCESS_HELD';289 if(B<0.35 || P>0.74 || C<0.05){state='MUST STOP'; route=instrument==='body'?'SIM_ROUTE_BODY_RUNTIME_MUST_STOP':'SIM_ROUTE_RESONANT_ACCESS_MUST_STOP'}290 else if(C<0.38 || G<0.28 || P>0.45){state='STRAINED'; route=instrument==='body'?'SIM_ROUTE_BODY_RUNTIME_STRAINED':'SIM_ROUTE_RESONANT_ACCESS_STRAINED'}291 else {route=instrument==='body'?'SIM_ROUTE_BODY_RUNTIME_HELD':'SIM_ROUTE_RESONANT_ACCESS_HELD'}292 const direction=directionFromInput();293 lastState={T,F,B,R,P,C,G,N,Rc,Lc,state,route,direction,ts:new Date().toISOString(),instrument};294 $('cVal').textContent=C.toFixed(3); $('gVal').textContent=G.toFixed(3);295 $('stateVal').textContent=state; $('stateVal').className='state '+(state==='HELD'?'held':state==='STRAINED'?'strained':'stop');296 $('routeVal').textContent=route; $('directionVal').textContent=direction.name; $('loopVal').textContent=loopCompleted?'RETURNED / NOURISHING':(phase==='IDLE'?'READY':phase);297 $('stateHud').textContent='State: '+state; $('stateHud').className='pill '+(state==='HELD'?'held':state==='STRAINED'?'strained':'stop'); $('routeHud').textContent='Route: '+route; $('phaseHud').textContent='Phase: '+phase;298 updateTextOutputs();299}300function directionFromInput(){301 let type=$('inputType').value; let purpose=$('purpose').value;302 if(purpose==='body') return clusters.body;303 if(purpose==='pressure') return clusters.boundary;304 return clusters[type]||clusters.text;305}306function updateTextOutputs(){307 const type=$('inputType').value, purpose=$('purpose').value, guide=$('guideMode').value;308 const direction=lastState.direction||directionFromInput();309 let plainDirect = type==='image'?'User-provided image/artifact metadata and user description, not hidden recognition.': type==='equation'?'The entered formal expression and declared variables/claims.': type==='body'?'A selected body-channel signal, treated as pressure information.':'The pasted or described text/claim.';310 $('translationOut').textContent = `Artifact type: ${type}\nPurpose: ${purpose}\nGuide mode: ${guide}\n\nWhat is actually present:\n- ${plainDirect}\n\nWhat may be inferred:\n- A bounded trace direction toward ${direction.name}.\n- HIR/OAM pressure can be read from tune clarity, tracer fit, boundary safety, source-return, and OAM load.\n\nWhat is not supported:\n- Hidden geolocation, packet routing, identity, diagnosis, consciousness, proof, or whole-pattern capture.\n\nRecommended coupling path:\n- Emit bounded tune signal.\n- Let compatible tracer/signal respond.\n- Open witness channel only if threshold is met.\n- Return value to substrate before stable growth.\n\nRetain / release:\n- Retain only the exported trace packet and explicit user-provided context.\n- Release unsupported claims and unneeded private residue.`;311 let interp;312 if(instrument==='globe'){313 interp = `<b>Globe:</b> Pressure mapping chooses the coupling direction. The tune signal does not grab; a compatible symbolic tracer responds. Coupling opens only at threshold. Mycelial growth appears only after return-to-substrate completes.`;314 } else {315 interp = `<b>Body:</b> The body is the runtime and the brain is the coprocessor. Information enters as pressure through body channels. HIR supports stable integration; OAM marks overload, distortion, stuck pressure, or must-stop conditions.`;316 }317 $('interpretation').innerHTML = interp + `<br><br><b>Current read:</b> ${lastState.state}. ${lastState.route}.<br>${growthNotice?'<b>Loop gate:</b> '+growthNotice+'<br>':''}<span class="small">All values are symbolic pressure indicators only.</span>`;318 $('jsonOut').textContent = JSON.stringify(buildPacket(), null, 2);319}320function buildPacket(){321 const type=$('inputType').value, purpose=$('purpose').value;322 return {323 artifact:'Resonant Access Body/Web Runtime',324 version:'0.1.2',325 instrument,326 createdAt:lastState.ts || new Date().toISOString(),327 lockedBoundary:'Tune, do not capture. Symbolic tracer, not the whole pattern. Not diagnosis. Not proof. Growth only after return.',328 coreLines:[329 'Pressure gives the pulse its direction. Coupling gives the trace its boundary. Return gives the field its growth.',330 'No grab. Tune, couple, witness, return, grow.',331 'The body is the runtime. The brain is the coprocessor. Pressure is the signal. HIR is the integration grammar. OAM is the overload map.'332 ],333 input:{type,purpose,guideMode:$('guideMode').value,artifactText:$('artifactText').value,boundaryText:$('boundaryText').value},334 pressure:{tuneClarity:lastState.T,tracerFit:lastState.F,boundarySafety:lastState.B,sourceReturn:lastState.R,oamLoad:lastState.P,couplingReadiness:lastState.C,growth:lastState.G},335 route:{state:lastState.state,route:lastState.route,direction:lastState.direction?.name,phase,loopCompleted},336 tracePacket:{337 patternSought:$('artifactText').value,338 tracerAccessed:'User-provided artifact / symbolic body channel',339 couplingPath:lastState.direction?.name,340 witnessed:['User-provided input and declared context'],341 inferred:['Symbolic coupling/growth direction from pressure map'],342 notSupported:['Real geolocation','packet routing','diagnosis','identity proof','consciousness proof','truth certification'],343 uncertainty:[344 'This is a first offline symbolic prototype',345 lastState.state==='MUST STOP' ? 'Current state is MUST STOP — coupling readiness is below threshold; do not treat any growth path drawn in this session as integrated.' :346 lastState.state==='STRAINED' ? 'Current state is STRAINED — the loop may be informative but should not be treated as stable integration without repair.' :347 'Current state is HELD — symbolic loop conditions are above threshold for this prototype.'348 ],349 agencyBoundary:$('boundaryText').value,350 retentionRule:'Retain only exported trace and explicit user-provided context.',351 releasePath:'Release unsupported claims, hidden capture assumptions, and private residue not needed for the trace.'352 }353 }354}355function exportJSON(){356 const blob=new Blob([JSON.stringify(buildPacket(),null,2)],{type:'application/json'});357 const a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download='RESONANT_ACCESS_BODY_WEB_TRACE_v0_1_2.json'; a.click(); URL.revokeObjectURL(a.href);358}359function emitTune(){phase='TUNE_SIGNAL';phaseStart=now();loopCompleted=false;for(let i=0;i<22;i++){particles.push(makeParticle())}pressureMap();}360function completeReturn(){361 if(returnTimer) clearTimeout(returnTimer);362 phase='RETURNING';363 phaseStart=now();364 growthNotice='Return pending — stable symbolic growth is gated by route state.';365 returnTimer=setTimeout(()=>{366 loopCompleted=true;367 const dir=directionFromInput();368 if(lastState.state==='HELD'){369 phase='NOURISHING';370 growthNotice='HELD: return completed; stable symbolic loop-growth added.';371 growthPaths.push({direction:dir,time:now(),strength:Math.max(0.2,lastState.G),state:'HELD'});372 } else if(lastState.state==='STRAINED'){373 phase='STRAINED_RETURN';374 growthNotice='STRAINED: return recorded as provisional; stable growth withheld pending repair.';375 growthPaths.push({direction:dir,time:now(),strength:Math.max(0.12,lastState.G),state:'STRAINED'});376 } else {377 phase='GROWTH_WITHHELD';378 growthNotice='MUST STOP: return recorded; growth withheld by boundary gate.';379 }380 pressureMap();381 returnTimer=null;382 },1500);383 pressureMap();384}385function clearDemoTimers(){ demoTimers.forEach(id=>clearTimeout(id)); demoTimers=[]; }386function runDemo(){clearDemoTimers();resetAll(false); demoTimers.push(setTimeout(()=>emitTune(),200)); demoTimers.push(setTimeout(()=>completeReturn(),2700));}387function resetAll(update=true){388 clearDemoTimers();389 if(returnTimer) clearTimeout(returnTimer);390 returnTimer=null;391 phase='IDLE';392 phaseStart=now();393 loopCompleted=false;394 growthPaths=[];395 particles=[];396 growthNotice='';397 if(update)pressureMap();398}399function makeParticle(){return {a:Math.random()*Math.PI*2,r:30+Math.random()*220,s:.4+Math.random()*1.1,life:1,color:Math.random()>.5?'#69d7ff':'#f5c85b'};}400 401function draw(){t+=0.016; ctx.clearRect(0,0,W,H); drawStars(); if(instrument==='globe') drawGlobe(); else drawBody(); requestAnimationFrame(draw);}402function drawStars(){ctx.save();ctx.fillStyle='#ffffff';for(let i=0;i<90;i++){let x=(Math.sin(i*44.3)*43758.5%1); if(x<0)x+=1; let y=(Math.sin(i*91.7)*23758.5%1); if(y<0)y+=1; let tw=(Math.sin(t*2+i)*.5+.5);ctx.globalAlpha=.12+tw*.32;ctx.beginPath();ctx.arc(x*W,y*H, i%3===0?1.3:.8,0,Math.PI*2);ctx.fill();}ctx.restore();}403function drawGlobe(){404 const cx=W/2, cy=H/2+16, R=210; const rot=t*.28;405 // substrate406 ctx.save(); ctx.globalAlpha=.65; for(let i=0;i<9;i++){ctx.strokeStyle=i%2?'#1b6d91':'#7c4cff';ctx.globalAlpha=.12;ctx.lineWidth=1.2;ctx.beginPath();for(let x=0;x<W;x+=8){let y=H-50+Math.sin(x*.018+i+t*.7)*14+Math.sin(x*.05+i)*5; if(x===0)ctx.moveTo(x,y);else ctx.lineTo(x,y)}ctx.stroke()}ctx.restore();407 // globe outer408 let grd=ctx.createRadialGradient(cx-70,cy-80,10,cx,cy,R+60);grd.addColorStop(0,'#6be5ff34');grd.addColorStop(.5,'#14284f18');grd.addColorStop(1,'#00000000');ctx.fillStyle=grd;ctx.beginPath();ctx.arc(cx,cy,R+18,0,Math.PI*2);ctx.fill();409 ctx.strokeStyle='#7de8ff88';ctx.lineWidth=1.5;ctx.beginPath();ctx.arc(cx,cy,R,0,Math.PI*2);ctx.stroke();410 // meridians and latitudes411 ctx.save();ctx.translate(cx,cy);ctx.strokeStyle='#69d7ff26';ctx.lineWidth=1;for(let i=-3;i<=3;i++){ctx.beginPath();ctx.ellipse(0,0,R*Math.cos(i*.22),R,rot+i*.22,0,Math.PI*2);ctx.stroke()}for(let j=-3;j<=3;j++){ctx.beginPath();ctx.ellipse(0,j*45,R*Math.sqrt(Math.max(.05,1-(j*45/R)**2)),20,0,0,Math.PI*2);ctx.stroke()}ctx.restore();412 // core diamond413 drawDiamond(cx,cy,28,'#f5c85b',.9+Math.sin(t*3)*.1);414 // growth paths415 growthPaths.forEach((p,idx)=>{416 const col=p.state==='STRAINED'?'#ffe071':'#74f6a7';417 drawCurvedPath(cx,cy,R,p.direction,1, p.strength, col, p.state==='HELD');418 });419 // phase path420 const dir=lastState.direction||directionFromInput();421 let progress=0; let elapsed=now()-phaseStart;422 if(phase==='TUNE_SIGNAL') progress=clamp(elapsed/2.2); else if(phase==='RETURNING') progress=1-clamp(elapsed/1.5); else if(phase==='NOURISHING') progress=1; else progress=0;423 if(phase!=='IDLE'){424 drawPressureScan(cx,cy,R,dir);425 if(phase==='TUNE_SIGNAL') drawCurvedPath(cx,cy,R,dir,progress,1,'#69d7ff',false);426 if(phase==='RETURNING') drawReturnPath(cx,cy,R,dir,1-progress);427 drawTracerNode(cx,cy,R,dir, phase==='TUNE_SIGNAL'?progress:1);428 } else drawTracerNode(cx,cy,R,dir,.35);429 particles=particles.filter(p=>p.life>0);particles.forEach(p=>{p.life-=.01;p.r+=p.s;ctx.globalAlpha=p.life*.55;ctx.fillStyle=p.color;ctx.beginPath();ctx.arc(cx+Math.cos(p.a)*p.r,cy+Math.sin(p.a)*p.r,2.2,0,Math.PI*2);ctx.fill();ctx.globalAlpha=1});430}431function pointOnGlobe(cx,cy,R,dir){let a=dir.angle+t*.08;return {x:cx+Math.cos(a)*R*.82,y:cy+Math.sin(a)*R*.58};}432function drawTracerNode(cx,cy,R,dir,alpha){let p=pointOnGlobe(cx,cy,R,dir);ctx.save();ctx.globalAlpha=.3+alpha*.7;let rad=8+alpha*8;ctx.fillStyle=dir.color;ctx.shadowColor=dir.color;ctx.shadowBlur=25;ctx.beginPath();ctx.arc(p.x,p.y,rad,0,Math.PI*2);ctx.fill();ctx.shadowBlur=0;ctx.strokeStyle='#ffffff99';ctx.beginPath();ctx.arc(p.x,p.y,rad+9+Math.sin(t*4)*4,0,Math.PI*2);ctx.stroke();ctx.fillStyle='#dcecff';ctx.font='12px Inter, sans-serif';ctx.fillText(dir.name,p.x+18,p.y-12);ctx.restore();}433function drawPressureScan(cx,cy,R,dir){let p=pointOnGlobe(cx,cy,R,dir);ctx.save();ctx.strokeStyle='#f5c85b44';ctx.lineWidth=1;for(let i=0;i<3;i++){ctx.globalAlpha=.25-i*.05;ctx.beginPath();ctx.arc(cx,cy,50+((t*80+i*70)%R),0,Math.PI*2);ctx.stroke()}ctx.strokeStyle='#f5c85b66';ctx.beginPath();ctx.moveTo(cx,cy);ctx.lineTo(p.x,p.y);ctx.stroke();ctx.restore();}434function drawCurvedPath(cx,cy,R,dir,progress,strength,color,stable){let p=pointOnGlobe(cx,cy,R,dir);let mx=(cx+p.x)/2 + Math.sin(dir.angle*2)*75;let my=(cy+p.y)/2 - Math.cos(dir.angle*2)*70;ctx.save();ctx.strokeStyle=color;ctx.shadowColor=color;ctx.shadowBlur=stable?18:12;ctx.lineWidth=stable?2.5+strength*5:2;ctx.globalAlpha=stable?.35+strength*.45:.75;ctx.beginPath();let steps=70;for(let i=0;i<=steps*progress;i++){let u=i/steps;let x=(1-u)*(1-u)*p.x+2*(1-u)*u*mx+u*u*cx;let y=(1-u)*(1-u)*p.y+2*(1-u)*u*my+u*u*cy + Math.sin(u*18+t*3)*5;if(i===0)ctx.moveTo(x,y);else ctx.lineTo(x,y)}ctx.stroke();ctx.restore();}435function drawReturnPath(cx,cy,R,dir,progress){drawCurvedPath(cx,cy,R,dir,progress,1,'#b9f3ff',false);}436function drawDiamond(x,y,r,color,alpha){ctx.save();ctx.globalAlpha=alpha;ctx.fillStyle=color;ctx.shadowColor=color;ctx.shadowBlur=30;ctx.beginPath();ctx.moveTo(x,y-r);ctx.lineTo(x+r*.8,y);ctx.lineTo(x,y+r);ctx.lineTo(x-r*.8,y);ctx.closePath();ctx.fill();ctx.strokeStyle='#fff8';ctx.stroke();ctx.restore();}437 438function drawBody(){439 const cx=W/2, top=70;440 // aura441 let grd=ctx.createRadialGradient(cx,250,20,cx,290,260);grd.addColorStop(0,'#69d7ff25');grd.addColorStop(.55,'#0b23491a');grd.addColorStop(1,'#0000');ctx.fillStyle=grd;ctx.fillRect(0,0,W,H);442 // body silhouette lines443 ctx.save();ctx.translate(cx,0);ctx.strokeStyle='#69d7ff55';ctx.lineWidth=2;ctx.shadowColor='#69d7ff';ctx.shadowBlur=12;444 ctx.beginPath();ctx.arc(0,top+55,42,0,Math.PI*2);ctx.stroke();445 ctx.beginPath();ctx.moveTo(0,top+98);ctx.bezierCurveTo(-74,160,-74,268,-48,358);ctx.bezierCurveTo(-34,430,-28,520,-38,590);ctx.moveTo(0,top+98);ctx.bezierCurveTo(74,160,74,268,48,358);ctx.bezierCurveTo(34,430,28,520,38,590);ctx.stroke();446 ctx.beginPath();ctx.moveTo(-48,210);ctx.bezierCurveTo(-145,250,-190,350,-205,470);ctx.moveTo(48,210);ctx.bezierCurveTo(145,250,190,350,205,470);ctx.stroke();447 ctx.restore();448 // organs/channels449 const channels=[450 {name:'Light → time',x:cx-5,y:top+48,c:'#69d7ff',emoji:'☀'},451 {name:'Brain coprocessor',x:cx,y:top+68,c:'#c18cff',emoji:'⌁'},452 {name:'Heart / breath',x:cx-8,y:250,c:'#ff5a76',emoji:'♥'},453 {name:'Gut / metabolic',x:cx,y:385,c:'#f5c85b',emoji:'◌'},454 {name:'Immune / repair',x:cx+105,y:330,c:'#74f6a7',emoji:'✚'},455 {name:'Touch / boundary',x:cx-160,y:370,c:'#b9f3ff',emoji:'◍'}456 ];457 channels.forEach(ch=>drawBodyNode(ch));458 // active flow459 const elapsed=now()-phaseStart;let progress=phase==='IDLE'?0:clamp(elapsed/2.4);if(phase==='RETURNING'||phase==='NOURISHING')progress=1;460 const type=$('inputType').value; let target=channels[1]; if(type==='image')target=channels[0]; if(type==='body')target=channels[2]; if(type==='mixed')target=channels[4]; if(type==='equation')target=channels[1];461 drawBodyFlow(target,progress);462 if(loopCompleted){channels.forEach((ch,i)=>{if(i>1) drawBodyReturn(ch, .65+Math.sin(t*2+i)*.25)})}463}464function drawBodyNode(ch){ctx.save();ctx.fillStyle=ch.c;ctx.shadowColor=ch.c;ctx.shadowBlur=24;ctx.globalAlpha=.75;ctx.beginPath();ctx.arc(ch.x,ch.y,16+Math.sin(t*3+ch.x)*2,0,Math.PI*2);ctx.fill();ctx.globalAlpha=1;ctx.font='12px Inter, sans-serif';ctx.fillStyle='#dcecff';ctx.fillText(ch.name,ch.x+22,ch.y+4);ctx.restore();}465function drawBodyFlow(target,progress){ctx.save();ctx.strokeStyle=lastState.state==='MUST STOP'?'#ff5a76':lastState.state==='STRAINED'?'#ffe071':'#69d7ff';ctx.shadowColor=ctx.strokeStyle;ctx.shadowBlur=18;ctx.lineWidth=4;ctx.globalAlpha=.75;ctx.beginPath();let sx=target.x-180, sy=target.y-90;for(let i=0;i<=80*progress;i++){let u=i/80;let x=(1-u)*(1-u)*sx+2*(1-u)*u*(target.x-70)+u*u*target.x;let y=(1-u)*(1-u)*sy+2*(1-u)*u*(target.y-10)+u*u*target.y+Math.sin(u*15+t*3)*4;if(i===0)ctx.moveTo(x,y);else ctx.lineTo(x,y)}ctx.stroke();ctx.restore();}466function drawBodyReturn(ch,alpha){ctx.save();ctx.strokeStyle='#b9f3ff';ctx.globalAlpha=alpha*.35;ctx.lineWidth=1.7;ctx.shadowColor='#b9f3ff';ctx.shadowBlur=10;ctx.beginPath();ctx.moveTo(W/2,250);ctx.quadraticCurveTo((W/2+ch.x)/2+Math.sin(t)*30,(250+ch.y)/2,ch.x,ch.y);ctx.stroke();ctx.restore();}467 468function resizeCanvas(){469 const wrap = canvas.parentElement;470 const cssW = Math.max(360, Math.floor(wrap.clientWidth));471 const cssH = Math.max(360, Math.floor(cssW * 620 / 900));472 canvas.style.height = cssH + 'px';473 const dpr = Math.min(window.devicePixelRatio || 1, 2);474 const newW = Math.floor(cssW * dpr), newH = Math.floor(cssH * dpr);475 if(canvas.width !== newW || canvas.height !== newH){476 canvas.width = newW; canvas.height = newH;477 W = canvas.width; H = canvas.height;478 }479}480window.addEventListener('resize', resizeCanvas);481resizeCanvas(); updateGuide(); updateInstrumentDescription(); pressureMap(); draw();482</script>483</body>484</html>485 