(function(){ const launchLinks=window.MNEMOSYNE_LAUNCH_LINKS||{}; const labels={collection_url:'View the Solstice Agent Reliability Lab',dataset_url:'Open benchmark dataset',space_repository_url:'Space repository',direct_space_url:'Open direct application',show_and_tell_url:'Show and Tell',community_call_url:'Community Calls',technical_feedback_url:'Technical feedback'}; const nav=document.querySelector('#launch-links'); if(nav) nav.innerHTML='Review the project Run a scenario or compare your memory system locally. '+Object.entries(labels).filter(([key])=>launchLinks[key]).map(([key,label])=>`${label}`).join(' · '); const scenarios=window.MNEMOSYNE_SCENARIOS; const scenarioEl=document.querySelector('#scenario'); const strategyEl=document.querySelector('#strategy'); let externalResult=null; for(const s of scenarios){const o=document.createElement('option');o.value=s.scenario_id;o.textContent=s.title;scenarioEl.append(o)} for(const s of MnemosyneCore.strategies){const o=document.createElement('option');o.value=s;o.textContent=s;strategyEl.append(o)} scenarioEl.value='mnemo-belief_revision-01'; function render(){ const s=scenarios.find(x=>x.scenario_id===scenarioEl.value)||scenarios[0]; const r=MnemosyneCore.run(strategyEl.value,s); document.querySelector('#validity').innerHTML=`Validity view
Revision ${MNEMOSYNE_VALIDITY.revision} · ${MNEMOSYNE_VALIDITY.scenarios} scenarios · ${MNEMOSYNE_VALIDITY.categories} categories · ${MNEMOSYNE_VALIDITY.strategies} strategies · ${MNEMOSYNE_VALIDITY.nonDiscriminating} scenarios currently tied. Metrics use explicit denominators and may be not_applicable.
Metric groups: current-belief accuracy · historical reconstruction · lifecycle correctness · privacy and promotion · temporal validity · duplicate evidence · authority resolution · erasure and revocation.
`; document.querySelector('#summary').innerHTML=`${s.title}${s.description} Query time: ${s.query_time}
Expected current answer: ${s.expected_current_answer}
`; document.querySelector('#timeline').innerHTML=s.observations.map(o=>`${r.strategy}
Current answer: ${r.current||'none'}
Active records: ${r.records.filter(x=>x.status==='active').length} · Superseded: ${r.superseded.length}
Evidence families counted: ${r.evidence.join(', ')}
`; document.querySelector('#comparison').innerHTML='| Strategy | Current answer | Superseded |
|---|---|---|
| ${x} | ${q.current||'none'} | ${q.superseded.length} |
${externalResult.tooling_version?'Bundle validated locally.':'manual_unverified result.'} Benchmark: ${externalResult.benchmark_version||'unknown'} · Fixture: ${externalResult.fixture_hash||'unknown'}
Current metric: ${externalResult.aggregate_metrics?.current_belief_accuracy ?? 'not_applicable'} · Historical: ${externalResult.aggregate_metrics?.historical_reconstruction_accuracy ?? 'not_applicable'}
` : 'External strategyNo external result loaded. Bundles are validated and compared locally; nothing is uploaded or persisted.
'; const remove=document.querySelector('#remove-external'); if(remove) remove.onclick=()=>{externalResult=null; render()}; } document.querySelector('#download').onclick=()=>{ const s=scenarios.find(x=>x.scenario_id===scenarioEl.value)||scenarios[0]; const result={benchmark_version:MNEMOSYNE_VALIDITY.revision,scenario_id:s.scenario_id,strategy:strategyEl.value,output:MnemosyneCore.run(strategyEl.value,s)}; const a=document.createElement('a');a.href=URL.createObjectURL(new Blob([JSON.stringify(result,null,2)],{type:'application/json'}));a.download=`mnemosyne-${s.scenario_id}-${strategyEl.value}.json`;a.click();URL.revokeObjectURL(a.href); }; document.querySelector('#demo').onclick=()=>{scenarioEl.value='mnemo-belief_revision-01';strategyEl.value='typed_lifecycle_lineage';render()}; scenarioEl.onchange=render; strategyEl.onchange=render; document.querySelector('#file').onchange=e=>{const f=e.target.files[0];if(!f)return;const reader=new FileReader();reader.onload=()=>{try{const data=JSON.parse(reader.result);if(data.scenario_id){scenarios.push(data);scenarioEl.value=data.scenario_id;render()}}catch{alert('Invalid local scenario')}};reader.readAsText(f)}; document.querySelector('#external-file').onchange=e=>{const f=e.target.files[0];if(!f)return;const reader=new FileReader();reader.onload=()=>{try{const data=JSON.parse(reader.result);const valid=(data.bundle_version==='mnemosyne-external-strategy-bundle/v1'&&data.benchmark_version==='v0.2.0'&&Array.isArray(data.scenario_level_outcomes))||(data.format_version==='mnemosyne-manual-result/v1'&&Array.isArray(data.results));if(!valid)throw new Error('invalid external result');externalResult=data;render()}catch{alert('Invalid external result bundle')}};reader.readAsText(f)}; render(); })();