superlocalmemory 4.0.6 → 4.0.7

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 (39) hide show
  1. package/CHANGELOG.md +55 -4
  2. package/README.md +6 -11
  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 +1 -1
  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 +1 -1
  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 +1 -1
  24. package/pyproject.toml +1 -1
  25. package/src/superlocalmemory/__init__.py +1 -1
  26. package/src/superlocalmemory/cli/commands.py +14 -0
  27. package/src/superlocalmemory/cli/main.py +9 -0
  28. package/src/superlocalmemory/cli/summary_cmd.py +195 -0
  29. package/src/superlocalmemory/code_graph/bridge/entity_resolver.py +26 -0
  30. package/src/superlocalmemory/code_graph/bridge/event_listeners.py +14 -3
  31. package/src/superlocalmemory/code_graph/bridge/maintenance.py +206 -0
  32. package/src/superlocalmemory/code_graph/config.py +65 -1
  33. package/src/superlocalmemory/core/fact_consolidator.py +24 -1
  34. package/src/superlocalmemory/core/maintenance.py +51 -1
  35. package/src/superlocalmemory/mcp/tools_code_graph.py +47 -3
  36. package/src/superlocalmemory/server/routes/memories.py +61 -0
  37. package/src/superlocalmemory/storage/schema_code_graph.py +44 -1
  38. package/src/superlocalmemory/ui/index.html +1 -1
  39. package/src/superlocalmemory/ui/js/fact-detail.js +61 -0
@@ -72,6 +72,67 @@ document.addEventListener('click', function(e) {
72
72
  body.appendChild(ent);
73
73
  }
74
74
 
75
+ // Code this memory refers to (4.0.7). Absent for anyone without a
76
+ // built code graph — the API returns [] rather than an error, so no
77
+ // section appears and nothing looks broken.
78
+ //
79
+ // textContent throughout, never innerHTML: every string here is a
80
+ // qualified name or file path read out of the indexed repository, so
81
+ // it is untrusted input as far as this panel is concerned.
82
+ if (data.code_links && data.code_links.length > 0) {
83
+ var codeWrap = document.createElement('div');
84
+ codeWrap.className = 'mt-2';
85
+
86
+ var codeLabel = document.createElement('strong');
87
+ codeLabel.textContent = 'Code referenced:';
88
+ codeWrap.appendChild(codeLabel);
89
+
90
+ var list = document.createElement('ul');
91
+ list.className = 'mb-0 ps-3';
92
+ list.style.listStyle = 'none';
93
+
94
+ data.code_links.forEach(function (link) {
95
+ var li = document.createElement('li');
96
+ li.className = 'mt-1';
97
+
98
+ var nameEl = document.createElement('code');
99
+ nameEl.textContent = link.qualified_name || link.name || '?';
100
+ li.appendChild(nameEl);
101
+
102
+ if (link.kind) {
103
+ var kind = document.createElement('span');
104
+ kind.className = 'text-muted';
105
+ kind.style.fontSize = '0.75rem';
106
+ kind.textContent = ' ' + link.kind;
107
+ li.appendChild(kind);
108
+ }
109
+
110
+ // A stale link points at code that has moved or gone. Saying
111
+ // so is the whole value of tracking staleness — silently
112
+ // showing it as current would be worse than not showing it.
113
+ if (link.is_stale) {
114
+ var stale = document.createElement('span');
115
+ stale.className = 'badge bg-warning text-dark ms-1';
116
+ stale.style.fontSize = '0.65rem';
117
+ stale.textContent = 'code changed';
118
+ li.appendChild(stale);
119
+ }
120
+
121
+ if (link.file_path) {
122
+ var loc = document.createElement('div');
123
+ loc.className = 'text-muted';
124
+ loc.style.fontSize = '0.7rem';
125
+ loc.textContent = link.file_path;
126
+ li.appendChild(loc);
127
+ }
128
+
129
+ list.appendChild(li);
130
+ });
131
+
132
+ codeWrap.appendChild(list);
133
+ body.appendChild(codeWrap);
134
+ }
135
+
75
136
  panel.appendChild(body);
76
137
  item.appendChild(panel);
77
138
  })