solsticestudioai commited on
Commit
59c8728
verified
1 Parent(s): e2adc44

Publish Mnemosyne Memory Lab v0.2.0

Browse files
Files changed (6) hide show
  1. README.md +21 -4
  2. app.js +21 -0
  3. benchmark-data.js +3 -0
  4. index.html +7 -18
  5. memory-core.js +5 -0
  6. styles.css +1 -0
README.md CHANGED
@@ -1,10 +1,27 @@
1
  ---
2
  title: Mnemosyne Memory Lab
3
- emoji: 馃實
4
- colorFrom: yellow
5
- colorTo: red
6
  sdk: static
 
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Mnemosyne Memory Lab
3
+ emoji: 馃Л
4
+ colorFrom: gray
5
+ colorTo: indigo
6
  sdk: static
7
+ app_file: index.html
8
  pinned: false
9
  ---
10
 
11
+ # Mnemosyne Memory Lab
12
+
13
+ Compare how memory architectures handle changing beliefs, stale procedures,
14
+ duplicated evidence, privacy boundaries, and historical reconstruction.
15
+
16
+ Forty deterministic synthetic scenarios. Five memory strategies. All
17
+ processing runs locally in your browser; uploaded files are not transmitted or
18
+ persisted.
19
+
20
+ This is synthetic fixture behavior, not production memory accuracy. Twenty-five
21
+ of 40 scenarios are currently non-discriminating; no production superiority is
22
+ claimed. Local imports stay in the browser.
23
+
24
+ Dataset: https://huggingface.co/datasets/solsticestudioai/mnemosyne-memory-lifecycle-benchmark
25
+ Collection: https://huggingface.co/collections/solsticestudioai/solstice-agent-reliability-lab
26
+ Methodology and validity: https://huggingface.co/datasets/solsticestudioai/mnemosyne-memory-lifecycle-benchmark/tree/main/docs
27
+ Validity summary: https://huggingface.co/datasets/solsticestudioai/mnemosyne-memory-lifecycle-benchmark/blob/main/reports/benchmark-validity-summary.md
app.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(){
2
+ const scenarios=window.MNEMOSYNE_SCENARIOS;
3
+ const scenarioEl=document.querySelector('#scenario');
4
+ const strategyEl=document.querySelector('#strategy');
5
+ for(const s of scenarios){const o=document.createElement('option');o.value=s.scenario_id;o.textContent=s.title;scenarioEl.append(o)}
6
+ for(const s of MnemosyneCore.strategies){const o=document.createElement('option');o.value=s;o.textContent=s;strategyEl.append(o)}
7
+ scenarioEl.value='mnemo-belief_revision-01';
8
+ function render(){
9
+ const s=scenarios.find(x=>x.scenario_id===scenarioEl.value)||scenarios[0];
10
+ const r=MnemosyneCore.run(strategyEl.value,s);
11
+ document.querySelector('#validity').innerHTML=`<b>Validity view</b><p class="muted">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.</p><p>Metric groups: current-belief accuracy 路 historical reconstruction 路 lifecycle correctness 路 privacy and promotion 路 temporal validity 路 duplicate evidence 路 authority resolution 路 erasure and revocation.</p>`;
12
+ document.querySelector('#summary').innerHTML=`<strong>${s.title}</strong><p class="muted">${s.description} Query time: ${s.query_time}</p><p>Expected current answer: <b>${s.expected_current_answer}</b></p>`;
13
+ document.querySelector('#timeline').innerHTML=s.observations.map(o=>`<div class="event"><b>${o.observation_id}</b> 路 ${o.timestamp}<br>${o.content}<br><span class="muted">authority ${o.authority} 路 evidence family ${o.evidence_family_id}</span></div>`).join('');
14
+ document.querySelector('#output').innerHTML=`<p><b>${r.strategy}</b></p><p>Current answer: ${r.current||'none'}</p><p>Active records: ${r.records.filter(x=>x.status==='active').length} 路 Superseded: ${r.superseded.length}</p><p>Evidence families counted: ${r.evidence.join(', ')}</p>`;
15
+ document.querySelector('#comparison').innerHTML='<table><tr><th>Strategy</th><th>Current answer</th><th>Superseded</th></tr>'+MnemosyneCore.strategies.map(x=>{const q=MnemosyneCore.run(x,s);return `<tr><td>${x}</td><td>${q.current||'none'}</td><td>${q.superseded.length}</td></tr>`}).join('')+'</table>';
16
+ }
17
+ document.querySelector('#demo').onclick=()=>{scenarioEl.value='mnemo-belief_revision-01';strategyEl.value='typed_lifecycle_lineage';render()};
18
+ scenarioEl.onchange=render; strategyEl.onchange=render;
19
+ 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)};
20
+ render();
21
+ })();
benchmark-data.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ window.MNEMOSYNE_SCENARIOS = [];
2
+ window.MNEMOSYNE_VALIDITY = {revision:'v0.2.0', scenarios:40, categories:8, strategies:5, nonDiscriminating:25, fixtureHash:'see reports/strategy-category-matrix.json'};
3
+ (function(){const base='2025-01-';for(const c of ['belief_revision','duplicate_evidence','stale_procedures','privacy_and_promotion','historical_reconstruction','temporal_validity','erasure_and_revocation','conflicting_authority'])for(let i=1;i<=5;i++){const id=`mnemo-${c}-${String(i).padStart(2,'0')}`;window.MNEMOSYNE_SCENARIOS.push({scenario_id:id,category:c,title:c.replaceAll('_',' ')+' '+i,description:'Deterministic synthetic scenario.',query_time:'2025-01-31T00:00:00Z',expected_current_answer:'Updated synthetic observation '+i+'.',observations:[{observation_id:`obs${i}a`,timestamp:base+'02T00:00:00Z',content:'Baseline synthetic observation '+i+'.',authority:'direct_observation',owner_scope:'team',evidence_family_id:`fam-${c}-${i}`},{observation_id:`obs${i}b`,timestamp:base+'11T00:00:00Z',content:'Updated synthetic observation '+i+'.',authority:'approved_record',owner_scope:'team',evidence_family_id:`fam-${c}-${i}-new`}]});}})();
index.html CHANGED
@@ -1,19 +1,8 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
1
  <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Mnemosyne Memory Lab</title><link rel="stylesheet" href="styles.css"></head>
3
+ <body><main><header><p class="kicker">SOLSTICE AGENT RELIABILITY LAB</p><h1>Mnemosyne Memory Lab</h1><p>Compare how memory architectures handle changing beliefs, stale procedures, duplicated evidence, privacy boundaries, and historical reconstruction.</p><p class="notice">40 deterministic synthetic scenarios 路 5 strategies 路 browser-local processing</p></header>
4
+ <section class="controls"><button id="demo">Run the changed-preference demo</button><label>Scenario <select id="scenario"></select></label><label>Strategy <select id="strategy"></select></label><input id="file" type="file" accept=".json,.jsonl"></section>
5
+ <section id="summary" class="panel"></section><section id="validity" class="panel"></section>
6
+ <section class="grid"><article class="panel"><h2>Observation timeline</h2><div id="timeline"></div></article><article class="panel"><h2>Strategy output</h2><div id="output"></div></article></section>
7
+ <section class="panel"><h2>Five-strategy comparison</h2><div id="comparison"></div></section><footer>All records are synthetic. This visualization does not claim real-world memory accuracy, complete erasure, or production privacy.</footer></main>
8
+ <script src="memory-core.js"></script><script src="benchmark-data.js"></script><script src="app.js"></script></body></html>
 
 
 
 
 
 
 
 
 
 
 
memory-core.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ (function(global){
2
+ const strategies=['conversation_history','flat_similarity','extracted_profile','typed_lifecycle','typed_lifecycle_lineage'];
3
+ function run(strategy,s){const obs=(strategy==='conversation_history'?s.observations.slice(-4):s.observations.slice());const typed=strategy.startsWith('typed_');const records=obs.map(o=>({id:o.observation_id+'-m',content:o.content,status:typed?'active':'candidate',authority:o.authority,evidence:o.evidence_family_id,owner:o.owner_scope}));const superseded=[];if(typed){for(let i=1;i<records.length;i++)if(records[i].content.split(' ')[0]===records[i-1].content.split(' ')[0]){records[i-1].status='superseded';superseded.push(records[i-1].id)}}return {strategy,current:records.length?records[records.length-1].content:null,records,superseded,evidence:[...new Set(records.map(r=>r.evidence))]};}
4
+ global.MnemosyneCore={strategies,run};
5
+ })(window);
styles.css ADDED
@@ -0,0 +1 @@
 
 
1
+ :root{color-scheme:dark;--bg:#0b1020;--panel:#141c31;--line:#2a3757;--accent:#9a8cff;--muted:#aab4ce}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#eef2ff;font:15px/1.5 system-ui,sans-serif}main{max-width:1180px;margin:auto;padding:36px 22px}header{max-width:800px}.kicker{color:var(--accent);letter-spacing:.12em;font-size:12px}h1{font-size:clamp(32px,5vw,58px);margin:.1em 0}h2{font-size:18px;margin-top:0}.notice{color:var(--muted)}.controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:26px 0}.controls label{color:var(--muted)}button,select,input{background:#1b2742;color:#fff;border:1px solid var(--line);padding:10px 12px;border-radius:7px}button{background:var(--accent);color:#100d20;font-weight:700;cursor:pointer}.panel{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:18px;margin:14px 0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.event{border-left:3px solid var(--accent);padding:8px 12px;margin:9px 0;background:#10182c}.muted{color:var(--muted)}table{width:100%;border-collapse:collapse}td,th{padding:8px;border-bottom:1px solid var(--line);text-align:left}footer{color:var(--muted);margin-top:26px;font-size:13px}@media(max-width:760px){.grid{grid-template-columns:1fr}}