superlocalmemory 3.8.1 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +2 -2
  3. package/package.json +1 -1
  4. package/plugin/.claude-plugin/plugin.json +1 -1
  5. package/plugin/CLAUDE.md +3 -3
  6. package/plugin/agents/slm-governance-advisor.md +1 -1
  7. package/plugin/agents/slm-loop-runner.md +1 -1
  8. package/plugin/agents/slm-memory-advisor.md +2 -2
  9. package/plugin/agents/slm-optimize-advisor.md +1 -1
  10. package/plugin/requirements.txt +1 -1
  11. package/plugin/skills/slm-cache/SKILL.md +1 -1
  12. package/plugin/skills/slm-compress/SKILL.md +1 -1
  13. package/plugin/skills/slm-governance/SKILL.md +1 -1
  14. package/plugin/skills/slm-graph/SKILL.md +1 -1
  15. package/plugin/skills/slm-loop/SKILL.md +1 -1
  16. package/plugin/skills/slm-mesh/SKILL.md +1 -1
  17. package/plugin/skills/slm-profile/SKILL.md +1 -1
  18. package/plugin/skills/slm-recall/SKILL.md +3 -5
  19. package/plugin/skills/slm-remember/SKILL.md +1 -1
  20. package/plugin/skills/slm-scope/SKILL.md +1 -1
  21. package/plugin/skills/slm-session/SKILL.md +1 -1
  22. package/plugin/skills/slm-status/SKILL.md +1 -1
  23. package/plugin-src/rules/AGENTS.md +2 -1
  24. package/plugin-src/skills/slm-cache/SKILL.md +1 -1
  25. package/plugin-src/skills/slm-compress/SKILL.md +1 -1
  26. package/plugin-src/skills/slm-graph/SKILL.md +1 -1
  27. package/plugin-src/skills/slm-recall/SKILL.md +3 -5
  28. package/plugin-src/skills/slm-remember/SKILL.md +1 -1
  29. package/plugin-src/skills/slm-session/SKILL.md +1 -1
  30. package/plugin-src/skills/slm-status/SKILL.md +1 -1
  31. package/pyproject.toml +1 -1
  32. package/scripts/postinstall.js +7 -1
  33. package/src/superlocalmemory/__init__.py +1 -1
  34. package/src/superlocalmemory/cli/commands.py +360 -2
  35. package/src/superlocalmemory/cli/main.py +62 -3
  36. package/src/superlocalmemory/cli/setup_wizard.py +142 -16
  37. package/src/superlocalmemory/core/component_healer.py +144 -0
  38. package/src/superlocalmemory/core/component_registry.py +487 -0
  39. package/src/superlocalmemory/core/config.py +21 -0
  40. package/src/superlocalmemory/core/embeddings.py +14 -1
  41. package/src/superlocalmemory/core/engine.py +9 -5
  42. package/src/superlocalmemory/core/ingestion_command.py +36 -16
  43. package/src/superlocalmemory/core/maintenance.py +43 -0
  44. package/src/superlocalmemory/core/maintenance_scheduler.py +28 -0
  45. package/src/superlocalmemory/core/recall_pipeline.py +39 -3
  46. package/src/superlocalmemory/core/store_pipeline.py +42 -0
  47. package/src/superlocalmemory/mcp/_daemon_proxy.py +6 -2
  48. package/src/superlocalmemory/mcp/_pool_adapter.py +4 -1
  49. package/src/superlocalmemory/mcp/tools_active.py +1 -1
  50. package/src/superlocalmemory/mcp/tools_core.py +17 -2
  51. package/src/superlocalmemory/retrieval/bridge_discovery.py +14 -0
  52. package/src/superlocalmemory/retrieval/spreading_activation.py +68 -38
  53. package/src/superlocalmemory/server/routes/behavioral.py +6 -2
  54. package/src/superlocalmemory/server/routes/learning.py +13 -3
  55. package/src/superlocalmemory/server/routes/memories.py +8 -3
  56. package/src/superlocalmemory/server/routes/v3_api.py +120 -0
  57. package/src/superlocalmemory/server/unified_daemon.py +266 -2
  58. package/src/superlocalmemory/storage/embedding_migrator.py +235 -0
  59. package/src/superlocalmemory/ui/index.html +3 -2
  60. package/src/superlocalmemory/ui/js/od-components.js +147 -0
  61. package/src/superlocalmemory/ui/js/od-entities.js +43 -0
  62. package/src/superlocalmemory/ui/js/od-graph.js +35 -0
  63. package/src/superlocalmemory/ui/js/od-health.js +18 -0
  64. package/src/superlocalmemory/ui/js/od-memories.js +37 -0
  65. package/src/superlocalmemory/ui/js/od-operations.js +36 -0
  66. package/src/superlocalmemory/ui/js/od-settings.js +72 -3
@@ -96,6 +96,9 @@
96
96
  '<button class="tab" data-od-tab="trust">Trust</button>' +
97
97
  '<button class="tab" data-od-tab="compliance">Compliance</button>' +
98
98
  '<button class="tab" data-od-tab="loops">Bounded Loops</button>' +
99
+ // Ingestion tab — restored: re-mounts #ingestion-overview + #ingestion-adapters
100
+ // so ng-ingestion.js (loaded in index.html) can populate them on call.
101
+ '<button class="tab" data-od-tab="ingestion">Ingestion</button>' +
99
102
  '</div>' +
100
103
 
101
104
  // ══════ LIFECYCLE TAB ══════════════════════════════════════════════
@@ -427,6 +430,31 @@
427
430
  '</div>' +
428
431
  '</div>' +
429
432
 
433
+ '</section>' +
434
+
435
+ // ══════ INGESTION TAB ═════════════════════════════════════════════
436
+ // Restoration: mounts #ingestion-overview and #ingestion-adapters so that
437
+ // window.loadIngestionStatus() (ng-ingestion.js) can populate them.
438
+ // ng-ingestion.js is loaded in index.html and defines loadIngestionStatus().
439
+ // Adapter action buttons use data-act-click="adapter-action" which is handled
440
+ // by event-delegation.js → adapterAction() defined in ng-ingestion.js.
441
+ // Backend: GET /api/adapters · POST /api/adapters/{enable|disable|start|stop}
442
+ '<section class="tabpane" data-od-pane="ingestion">' +
443
+
444
+ '<div class="page-head" style="margin-bottom:16px">' +
445
+ '<h2 style="font-size:20px;margin-bottom:6px">Connectors &amp; Ingestion</h2>' +
446
+ '<p style="font-size:13.5px">' +
447
+ 'Gmail, Calendar, and Transcript adapters — enable to start building memory ' +
448
+ 'from external sources. All processing is local.' +
449
+ '</p>' +
450
+ '</div>' +
451
+
452
+ // #ingestion-overview — ng-ingestion.js: 4 stat cards (Available/Enabled/Running/Privacy)
453
+ '<div id="ingestion-overview"></div>' +
454
+
455
+ // #ingestion-adapters — ng-ingestion.js: adapter cards (Gmail/Calendar/Transcript)
456
+ '<div id="ingestion-adapters" style="margin-top:16px"></div>' +
457
+
430
458
  '</section>'
431
459
  );
432
460
  }
@@ -1227,6 +1255,14 @@
1227
1255
  window.odRenderTeam(document.getElementById('od-team-mount'));
1228
1256
  }
1229
1257
 
1258
+ // Ingestion (Gmail / Calendar / Transcript) — re-linked to ng-ingestion.js.
1259
+ // #ingestion-overview and #ingestion-adapters are now in the skeleton DOM
1260
+ // (inside the Ingestion tab section); calling loadIngestionStatus() renders them.
1261
+ // The function is null-guarded: no-op if ng-ingestion.js failed to load.
1262
+ if (typeof window.loadIngestionStatus === 'function') {
1263
+ window.loadIngestionStatus();
1264
+ }
1265
+
1230
1266
  }).catch(function (err) {
1231
1267
  container.innerHTML =
1232
1268
  '<div style="color:var(--danger);text-align:center;padding:48px 0">' +
@@ -509,6 +509,75 @@
509
509
  }).catch(function () {});
510
510
  }
511
511
 
512
+ /* ═══════════════════════════════════════════════════════════
513
+ GROUP — Recall & Memory Behaviour (v3.8.2, live-apply, no restart)
514
+ PUT /api/v3/runtime/config {retrieval:{top_k,use_cross_encoder},
515
+ injection:{enabled,core_block_enabled,
516
+ core_block_max_facts}}
517
+ ═══════════════════════════════════════════════════════════ */
518
+ function buildRuntime() {
519
+ var topkWrap = makeRange('rt-topk', 1, 200, 1, 20);
520
+ var topkInp = topkWrap.querySelector('input');
521
+ var xencSw = makeSwitch('rt-xenc', true);
522
+ var injSw = makeSwitch('rt-inj', true);
523
+ var cbSw = makeSwitch('rt-cb', true);
524
+ var cbWrap = makeRange('rt-cbmax', 0, 50, 1, 5);
525
+ var cbInp = cbWrap.querySelector('input');
526
+ var st = makeSt('rt');
527
+ function save() {
528
+ authPut('/api/v3/runtime/config', {
529
+ retrieval: {
530
+ top_k: Number(topkInp.value),
531
+ use_cross_encoder: xencSw.classList.contains('on')
532
+ },
533
+ injection: {
534
+ enabled: injSw.classList.contains('on'),
535
+ core_block_enabled: cbSw.classList.contains('on'),
536
+ core_block_max_facts: Number(cbInp.value)
537
+ }
538
+ }).then(function (r) { return r.json(); })
539
+ .then(function (d) {
540
+ setSt('rt', d.success !== false ? 'Applied' : esc(d.error || 'Error'), d.success !== false);
541
+ if (d.success !== false) loadRuntime();
542
+ })
543
+ .catch(function () { setSt('rt', 'Error', false); toast('Save failed', true); });
544
+ }
545
+ // Ranges save on release ('change'), not each drag tick ('input').
546
+ topkInp.addEventListener('change', save);
547
+ cbInp.addEventListener('change', save);
548
+ xencSw.addEventListener('od-toggle', save);
549
+ injSw.addEventListener('od-toggle', save);
550
+ cbSw.addEventListener('od-toggle', save);
551
+ return makeGrp('Recall & Memory Behaviour (auto-saves, no restart)', 'operations', [
552
+ makeRow('Recall depth', 'Memories each recall considers — higher is more thorough, a little slower', 'retrieval.top_k', topkWrap),
553
+ makeRow('Reranker', 'Re-scores results for quality (uses ~200MB RAM, adds ~200ms)', 'retrieval.use_cross_encoder', xencSw),
554
+ makeRow('Inject memories into prompts', 'Master switch for automatic memory injection', 'injection.enabled', injSw),
555
+ makeRow('Core-memory block', 'Prepend your most important facts to every prompt', 'injection.core_block_enabled', cbSw),
556
+ makeRow('Core-block size', 'Max facts in the core-memory block', 'injection.core_block_max_facts', cbWrap),
557
+ makeRow('Status', '', '', st)
558
+ ]);
559
+ }
560
+ function loadRuntime() {
561
+ fetch('/api/v3/runtime/config').then(function (r) { return r.ok ? r.json() : null; })
562
+ .then(function (d) {
563
+ if (!d || !d.config) return;
564
+ var rt = d.config.retrieval || {}, inj = d.config.injection || {};
565
+ function setRange(id, val) {
566
+ var i = q(id); if (i == null) return;
567
+ i.value = val; var disp = q(id + '-disp'); if (disp) disp.textContent = val;
568
+ }
569
+ function setSw(id, on) {
570
+ var s = q(id); if (!s) return;
571
+ s.classList.toggle('on', !!on); s.setAttribute('aria-checked', String(!!on));
572
+ }
573
+ if (rt.top_k != null) setRange('rt-topk', rt.top_k);
574
+ setSw('rt-xenc', rt.use_cross_encoder);
575
+ setSw('rt-inj', inj.enabled);
576
+ setSw('rt-cb', inj.core_block_enabled);
577
+ if (inj.core_block_max_facts != null) setRange('rt-cbmax', inj.core_block_max_facts);
578
+ }).catch(function () {});
579
+ }
580
+
512
581
  /* ═══════════════════════════════════════════════════════════
513
582
  GROUP 5 — Auto-Capture
514
583
  ═══════════════════════════════════════════════════════════ */
@@ -1026,8 +1095,8 @@
1026
1095
  });
1027
1096
  }
1028
1097
  function loadAll() {
1029
- loadMode(); loadEmb(); loadStorage(); loadScope(); loadCapture();
1030
- loadRecall(); loadInvoke(); loadForgetting(); loadEvolution();
1098
+ loadMode(); loadEmb(); loadStorage(); loadScope(); loadRuntime();
1099
+ loadCapture(); loadRecall(); loadInvoke(); loadForgetting(); loadEvolution();
1031
1100
  loadBackup(); loadMesh(); loadTrust(); loadRateLimit(); loadDaemon();
1032
1101
  }
1033
1102
 
@@ -1062,7 +1131,7 @@
1062
1131
  hub.appendChild(sWrap);
1063
1132
 
1064
1133
  var frag = document.createDocumentFragment();
1065
- [buildMode(), buildEmb(), buildStorage(), buildScope(),
1134
+ [buildMode(), buildEmb(), buildStorage(), buildScope(), buildRuntime(),
1066
1135
  buildCapture(), buildRecall(), buildInvoke(), buildForgetting(),
1067
1136
  buildEvolution(), buildBackup(), buildMesh(), buildTrust(),
1068
1137
  buildRateLimit(), buildDaemon()