Ares-Lab / apps /static /app.js
Ares Publisher
Add Ares Lab source and Colab training notebook
8efdc48
Raw
History Blame Contribute Delete
1.38 kB
const $=s=>document.querySelector(s),msgs=$('#messages');let local=false;$('#consent').onclick=()=>{local=!local;$('#consent').textContent=local?'Local session notes enabled':'Enable local session notes'};$('#form').onsubmit=e=>{e.preventDefault();const text=$('#input').value.trim();if(!text)return;msgs.insertAdjacentHTML('beforeend',`<article><b>YOU</b><p>${text.replaceAll('<','&lt;')}</p></article><article class="ares"><b>ARES</b><p>Static UI demonstration: no runtime is attached, so I cannot fabricate a model response. Deploy the approved Python runtime separately, or add a reviewed browser inference build.</p></article>`);$('#input').value='';msgs.scrollTop=msgs.scrollHeight};const proposal={title:'Example: add a calculator tool',status:'PROPOSED — NOT EXECUTABLE',scope:'A pure local arithmetic module only.',data:'No data access.',risks:['Incorrect results; test boundary cases.'],tests:['unit tests for arithmetic and divide-by-zero'],rollback:'Delete the module and plan record.',commands:['python -m unittest tests/test_calculator.py']};$('#plan').onclick=()=>{$('#review').hidden=false;$('#proposal').textContent=JSON.stringify(proposal,null,2)};$('#approve').onclick=()=>{proposal.status='APPROVED RECORD ONLY — still requires sandbox execution';$('#proposal').textContent=JSON.stringify(proposal,null,2)};$('#reject').onclick=()=>{$('#review').hidden=true};