const StrataUI=(()=>{ const esc=v=>String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); function render(){document.querySelector('#view').innerHTML='
Flash-Next als native Chat-Laufzeit hinter dem bestehenden Athena-Endpunkt. Zwei GPUs, Experten in RAM/SSD, MTP auf der zweiten GPU. Kein zusätzlicher öffentlicher API-Port.
Chat-Profile öffnen →';refresh();} async function api(path='',body){const r=await fetch('/api/v1/strata-runtime'+path,body!==undefined?{method:'POST',headers:{'Content-Type':'application/json','X-Athena-Deck':'1'},body:JSON.stringify(body)}:{});const d=await r.json();if(!r.ok)throw Error(d.error);return d;} async function refresh(){const root=document.querySelector('#strata-state');if(!root)return;try{ const [d,c]=await Promise.all([api(),fetch('/api/v1/catalog').then(r=>r.json())]);if(!root.isConnected)return; root.innerHTML=`${d.installed?'Installiert':'Einrichtung erforderlich'} · ${esc(d.revision?.slice(0,12))}
${esc(d.job?.phase||'Kein Einrichtungsauftrag aktiv.')}
CPU-Vision: ${d.vision?'bereit':'Encoder unter CPU-Vision vorbereiten installieren'}. Ein Slot bis 524288 (oberhalb 262144 mit YaRN ×2) oder zwei Slots mit je maximal 262144. Große Kontexte benötigen zusätzlichen RAM.
${Object.entries(d.models).map(([q,ready])=>`${esc(q)}: ${ready?'vorbereitet':'Paket fehlt'}`).join(' · ')}
${d.job?.state==='running'?'':''}`; for(const [id,path,body] of [['strata-install','/install',()=>({})],['strata-prepare','/prepare',()=>({model_id:document.querySelector('#strata-model').value})],['strata-vision','/vision',()=>({})],['strata-cancel','/cancel',()=>({})]])document.querySelector('#'+id)?.addEventListener('click',async event=>{event.target.disabled=true;try{await api(path,body());refresh();}catch(e){document.querySelector('#strata-message').textContent=e.message;event.target.disabled=false;}}); }catch(e){if(root.isConnected)root.textContent=e.message;}finally{setTimeout(()=>{if(root.isConnected)refresh();},4000);}} return {render}; })(); const BasaltUI=(()=>{ const esc=v=>String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); function render(){document.querySelector('#view').innerHTML='Flash-Next: Text-Engine auf RTX 5080 mit RAM-Experten. Optionaler separater Vision-Encoder auf RTX 3060; passender BF16-Projektor und GPU im Chatprofil. Strata bleibt als eigene Laufzeit verfügbar. TTS wird nicht verändert.
Chat-Profile öffnen →';refresh();} async function api(path='',body){const r=await fetch('/api/v1/basalt-runtime'+path,body===undefined?{}:{method:'POST',headers:{'Content-Type':'application/json','X-Athena-Deck':'1'},body:JSON.stringify(body)});const d=await r.json();if(!r.ok)throw Error(d.error||'Basalt-Anfrage fehlgeschlagen');return d;} async function refresh(){const root=document.querySelector('#basalt-state');if(!root)return;try{ const [d,c]=await Promise.all([api(),fetch('/api/v1/catalog').then(r=>r.json())]);if(!root.isConnected)return; const model=(c.entries||[]).find(m=>m.repo===d.model.repo&&m.revision===d.model.revision&&m.file===d.model.file&&m.sha256===d.model.sha256); const downloading=(c.downloads||[]).some(j=>['queued','downloading'].includes(j.state)&&j.repo===d.model.repo&&j.file===d.model.file&&j.revision===d.model.revision); root.innerHTML=`${d.installed?'Laufzeit installiert':'Einrichtung erforderlich'} · ${esc(d.revision.slice(0,12))}
${esc(d.job?.phase||'Kein Einrichtungsauftrag aktiv.')}
Ein oder zwei Slots, jeweils bis ${esc(d.context_per_slot)} Kontexttokens. Experten RAM-resident, int8-KV, automatischer GPU-Cache und MTP aus dem Modellpaket. Genau eine explizite SM120-GPU; kein zweiter öffentlicher API-Port.
${d.job?.state==='running'?'':''}${esc(d.model.file)} · ${(d.model.size/1024**3).toFixed(2)} GiB · ${model?'in der Bibliothek':downloading?'Download vorgemerkt oder aktiv':'noch nicht vorhanden'}
Originalquelle und Lizenz prüfen ↗ · feste Revision und vollständige SHA-256-Prüfung.
${model?'':''}Installation und Download starten kein Modell und ändern weder vorhandene Profile noch deren API-Freigaben. Fortschritt und Download-Abbruch stehen unter Downloads. Aktivierung erst über ein neues Basalt-Chatprofil; nicht parallel zu Strata auf derselben GPU.
`; for(const [id,path] of [['basalt-install','/install'],['basalt-cancel','/cancel'],['basalt-model','/model']])root.querySelector('#'+id)?.addEventListener('click',async event=>{event.target.disabled=true;try{await api(path,{});await refresh();}catch(e){document.querySelector('#basalt-message').textContent=e.message;event.target.disabled=false;}}); root.querySelector('#basalt-profile')?.addEventListener('click',()=>Studio.openProfile('chat',model.id)); }catch(e){if(root.isConnected)root.textContent=e.message;}finally{setTimeout(()=>{if(root.isConnected)refresh();},4000);}} return {render}; })();