superlocalmemory 3.4.17 → 3.4.19
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.
- package/CHANGELOG.md +19 -0
- package/package.json +1 -3
- package/pyproject.toml +10 -1
- package/src/superlocalmemory/cli/setup_wizard.py +30 -0
- package/src/superlocalmemory/core/embeddings.py +8 -2
- package/src/superlocalmemory/retrieval/reranker.py +4 -2
- package/src/superlocalmemory.egg-info/PKG-INFO +4 -1
- package/src/superlocalmemory.egg-info/requires.txt +3 -0
- package/docs/ARCHITECTURE.md +0 -149
- package/docs/api-reference.md +0 -284
- package/docs/auto-memory.md +0 -150
- package/docs/cli-reference.md +0 -327
- package/docs/cloud-backup.md +0 -174
- package/docs/compliance.md +0 -191
- package/docs/configuration.md +0 -182
- package/docs/getting-started.md +0 -102
- package/docs/ide-setup.md +0 -261
- package/docs/mcp-tools.md +0 -220
- package/docs/migration-from-v2.md +0 -170
- package/docs/profiles.md +0 -173
- package/docs/screenshots/01-dashboard-main.png +0 -0
- package/docs/screenshots/02-knowledge-graph.png +0 -0
- package/docs/screenshots/03-math-health.png +0 -0
- package/docs/screenshots/03-patterns-learning.png +0 -0
- package/docs/screenshots/04-learning-dashboard.png +0 -0
- package/docs/screenshots/04-recall-lab.png +0 -0
- package/docs/screenshots/05-behavioral-analysis.png +0 -0
- package/docs/screenshots/05-trust-dashboard.png +0 -0
- package/docs/screenshots/06-graph-communities.png +0 -0
- package/docs/screenshots/06-settings.png +0 -0
- package/docs/screenshots/07-memories-blurred.png +0 -0
- package/docs/skill-evolution.md +0 -256
- package/docs/troubleshooting.md +0 -310
- package/docs/v2-archive/ACCESSIBILITY.md +0 -291
- package/docs/v2-archive/ARCHITECTURE.md +0 -886
- package/docs/v2-archive/CLI-COMMANDS-REFERENCE.md +0 -425
- package/docs/v2-archive/COMPRESSION-README.md +0 -390
- package/docs/v2-archive/FRAMEWORK-INTEGRATIONS.md +0 -300
- package/docs/v2-archive/MCP-MANUAL-SETUP.md +0 -775
- package/docs/v2-archive/MCP-TROUBLESHOOTING.md +0 -787
- package/docs/v2-archive/PATTERN-LEARNING.md +0 -228
- package/docs/v2-archive/PROFILES-GUIDE.md +0 -453
- package/docs/v2-archive/RESET-GUIDE.md +0 -353
- package/docs/v2-archive/SEARCH-ENGINE-V2.2.0.md +0 -749
- package/docs/v2-archive/SEARCH-INTEGRATION-GUIDE.md +0 -502
- package/docs/v2-archive/UI-SERVER.md +0 -262
- package/docs/v2-archive/UNIVERSAL-INTEGRATION.md +0 -488
- package/docs/v2-archive/V2.2.0-OPTIONAL-SEARCH.md +0 -666
- package/docs/v2-archive/WINDOWS-INSTALL-README.txt +0 -34
- package/docs/v2-archive/WINDOWS-POST-INSTALL.txt +0 -45
- package/docs/v2-archive/example_graph_usage.py +0 -146
- package/ui/index.html +0 -1879
- package/ui/js/agents.js +0 -192
- package/ui/js/auto-settings.js +0 -399
- package/ui/js/behavioral.js +0 -276
- package/ui/js/clusters.js +0 -206
- package/ui/js/compliance.js +0 -252
- package/ui/js/core.js +0 -246
- package/ui/js/dashboard.js +0 -110
- package/ui/js/events.js +0 -178
- package/ui/js/fact-detail.js +0 -92
- package/ui/js/feedback.js +0 -333
- package/ui/js/graph-core.js +0 -447
- package/ui/js/graph-filters.js +0 -220
- package/ui/js/graph-interactions.js +0 -351
- package/ui/js/graph-ui.js +0 -214
- package/ui/js/ide-status.js +0 -102
- package/ui/js/init.js +0 -45
- package/ui/js/learning.js +0 -435
- package/ui/js/lifecycle.js +0 -298
- package/ui/js/math-health.js +0 -98
- package/ui/js/memories.js +0 -264
- package/ui/js/modal.js +0 -357
- package/ui/js/patterns.js +0 -93
- package/ui/js/profiles.js +0 -236
- package/ui/js/recall-lab.js +0 -292
- package/ui/js/search.js +0 -59
- package/ui/js/settings.js +0 -224
- package/ui/js/timeline.js +0 -32
- package/ui/js/trust-dashboard.js +0 -73
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
# SuperLocalMemory V2 - UI Server
|
|
2
|
-
|
|
3
|
-
Web-based visualization interface for exploring the SuperLocalMemory knowledge graph.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
### 8 REST API Endpoints
|
|
8
|
-
|
|
9
|
-
1. **GET /api/memories** - List memories with filtering (category, project, cluster, importance)
|
|
10
|
-
2. **GET /api/graph** - Graph data for D3.js force-directed visualization
|
|
11
|
-
3. **GET /api/clusters** - Cluster information with themes and members
|
|
12
|
-
4. **GET /api/patterns** - Learned user preferences and coding patterns
|
|
13
|
-
5. **GET /api/stats** - System statistics overview
|
|
14
|
-
6. **POST /api/search** - Semantic search using TF-IDF similarity
|
|
15
|
-
7. **GET /api/timeline** - Temporal view of memory creation
|
|
16
|
-
8. **GET /api/tree** - Hierarchical tree structure
|
|
17
|
-
|
|
18
|
-
### UI Features
|
|
19
|
-
|
|
20
|
-
- **Knowledge Graph**: Interactive D3.js force-directed graph showing memory relationships
|
|
21
|
-
- **Memory Browser**: Searchable table with filtering by category/project
|
|
22
|
-
- **Cluster Analysis**: Visual breakdown of thematic clusters with top entities
|
|
23
|
-
- **Pattern Viewer**: Display learned preferences and coding styles
|
|
24
|
-
- **Timeline**: Chart showing memory creation over time
|
|
25
|
-
- **Statistics Dashboard**: Real-time system metrics with animated stat counters (ease-out cubic on page load)
|
|
26
|
-
- **Memory Detail Modal**: Click any memory row to see full content, metadata, and tags in an overlay modal
|
|
27
|
-
- **Dark Mode Toggle**: Sun/moon icon in the navbar; preference saved to localStorage and respects system preference (`prefers-color-scheme`)
|
|
28
|
-
- **Export Functionality**:
|
|
29
|
-
- **Export All**: Download entire memory database as JSON or JSONL
|
|
30
|
-
- **Export Search Results**: Export current search results to JSON
|
|
31
|
-
- **Export as Markdown**: Export an individual memory as a Markdown file
|
|
32
|
-
- **Search Score Bars**: Color-coded relevance bars in search results (red for low, yellow for medium, green for high relevance)
|
|
33
|
-
- **Loading Spinners and Empty States**: Professional loading feedback and informative empty states across all tabs
|
|
34
|
-
|
|
35
|
-
## Quick Start
|
|
36
|
-
|
|
37
|
-
### 1. Install Dependencies
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
cd ~/Documents/AGENTIC_Official/SuperLocalMemoryV2-repo
|
|
41
|
-
pip install -r requirements-ui.txt
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 2. Ensure Memory Database Exists
|
|
45
|
-
|
|
46
|
-
The UI server requires an existing memory database. If you haven't created one yet:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
# Create demo database with sample data
|
|
50
|
-
python create_demo_db.py
|
|
51
|
-
|
|
52
|
-
# OR use your existing ~/.superlocalmemory/memory.db
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 3. Start the Server
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
python ui_server.py
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The server will start on **http://localhost:8765**
|
|
62
|
-
|
|
63
|
-
### 4. Open UI
|
|
64
|
-
|
|
65
|
-
Navigate to: **http://localhost:8765**
|
|
66
|
-
|
|
67
|
-
Interactive API documentation: **http://localhost:8765/docs**
|
|
68
|
-
|
|
69
|
-
## Usage
|
|
70
|
-
|
|
71
|
-
### Exploring the Knowledge Graph
|
|
72
|
-
|
|
73
|
-
1. Click **Knowledge Graph** tab
|
|
74
|
-
2. Hover over nodes to see memory details
|
|
75
|
-
3. Drag nodes to rearrange the layout
|
|
76
|
-
4. Change max nodes using the dropdown (50/100/200)
|
|
77
|
-
|
|
78
|
-
Node colors represent different clusters. Node size represents importance.
|
|
79
|
-
|
|
80
|
-
### Searching Memories
|
|
81
|
-
|
|
82
|
-
1. Click **Memories** tab
|
|
83
|
-
2. Enter search query in the search box
|
|
84
|
-
3. Or use filters: category, project
|
|
85
|
-
4. View results in the table
|
|
86
|
-
|
|
87
|
-
### Analyzing Clusters
|
|
88
|
-
|
|
89
|
-
1. Click **Clusters** tab
|
|
90
|
-
2. View thematic groupings of related memories
|
|
91
|
-
3. Top entities show dominant concepts in each cluster
|
|
92
|
-
|
|
93
|
-
### Viewing Learned Patterns
|
|
94
|
-
|
|
95
|
-
1. Click **Patterns** tab
|
|
96
|
-
2. See extracted preferences (tech stack, coding style, etc.)
|
|
97
|
-
3. Confidence % shows pattern strength
|
|
98
|
-
|
|
99
|
-
### Timeline Analysis
|
|
100
|
-
|
|
101
|
-
1. Click **Timeline** tab
|
|
102
|
-
2. View memory creation over last 30 days
|
|
103
|
-
3. Identify activity patterns
|
|
104
|
-
|
|
105
|
-
## API Examples
|
|
106
|
-
|
|
107
|
-
### Get Memories (with filters)
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
curl "http://localhost:8765/api/memories?category=Frontend&limit=10"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Search Memories
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
curl -X POST "http://localhost:8765/api/search" \
|
|
117
|
-
-H "Content-Type: application/json" \
|
|
118
|
-
-d '{"query": "react components", "limit": 10, "min_score": 0.3}'
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Get Graph Data
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
curl "http://localhost:8765/api/graph?max_nodes=100"
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Get Statistics
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
curl "http://localhost:8765/api/stats"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Configuration
|
|
134
|
-
|
|
135
|
-
### Database Path
|
|
136
|
-
|
|
137
|
-
By default, the server uses:
|
|
138
|
-
- Demo mode: `demo-memory.db` in the repo
|
|
139
|
-
- Production: `~/.superlocalmemory/memory.db`
|
|
140
|
-
|
|
141
|
-
To change the database path, modify `DB_PATH` in `ui_server.py`.
|
|
142
|
-
|
|
143
|
-
### Server Port
|
|
144
|
-
|
|
145
|
-
To change the port from the default (8765):
|
|
146
|
-
|
|
147
|
-
```python
|
|
148
|
-
# In ui_server.py, line ~650
|
|
149
|
-
uvicorn.run(app, host="0.0.0.0", port=8080) # Change 8765 to 8080
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Or use command line:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
uvicorn api_server:app --port 8080
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### CORS (for external access)
|
|
159
|
-
|
|
160
|
-
If accessing from a different domain, add CORS middleware:
|
|
161
|
-
|
|
162
|
-
```python
|
|
163
|
-
from fastapi.middleware.cors import CORSMiddleware
|
|
164
|
-
|
|
165
|
-
app.add_middleware(
|
|
166
|
-
CORSMiddleware,
|
|
167
|
-
allow_origins=["*"],
|
|
168
|
-
allow_methods=["*"],
|
|
169
|
-
allow_headers=["*"],
|
|
170
|
-
)
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Architecture
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
ui_server.py # FastAPI backend (8 endpoints)
|
|
177
|
-
ui/
|
|
178
|
-
├── index.html # Single-page UI
|
|
179
|
-
└── app.js # Frontend JavaScript (D3.js + Bootstrap)
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Tech Stack
|
|
183
|
-
|
|
184
|
-
**Backend:**
|
|
185
|
-
- FastAPI - Modern Python web framework
|
|
186
|
-
- Uvicorn - ASGI server
|
|
187
|
-
- SQLite - Database queries
|
|
188
|
-
|
|
189
|
-
**Frontend:**
|
|
190
|
-
- Bootstrap 5 - UI framework
|
|
191
|
-
- D3.js v7 - Force-directed graph visualization
|
|
192
|
-
- Vanilla JavaScript - No build step required
|
|
193
|
-
|
|
194
|
-
## Troubleshooting
|
|
195
|
-
|
|
196
|
-
### Server won't start
|
|
197
|
-
|
|
198
|
-
**Error: `Memory database not found`**
|
|
199
|
-
|
|
200
|
-
Solution: Create database first:
|
|
201
|
-
```bash
|
|
202
|
-
python create_demo_db.py
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Error: `ModuleNotFoundError: No module named 'fastapi'`**
|
|
206
|
-
|
|
207
|
-
Solution: Install requirements:
|
|
208
|
-
```bash
|
|
209
|
-
pip install -r requirements-ui.txt
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Graph not displaying
|
|
213
|
-
|
|
214
|
-
Check browser console for errors. Common issues:
|
|
215
|
-
- Database has no graph data (run graph engine first)
|
|
216
|
-
- No memories with cluster_id set
|
|
217
|
-
|
|
218
|
-
To build graph:
|
|
219
|
-
```bash
|
|
220
|
-
python -c "from src.graph_engine import GraphEngine; GraphEngine().build_graph()"
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Search returns no results
|
|
224
|
-
|
|
225
|
-
TF-IDF search requires:
|
|
226
|
-
1. Multiple memories in database
|
|
227
|
-
2. Diverse vocabulary
|
|
228
|
-
3. Query matching content keywords
|
|
229
|
-
|
|
230
|
-
Try broader search terms or check if vectors are built.
|
|
231
|
-
|
|
232
|
-
## Performance Notes
|
|
233
|
-
|
|
234
|
-
- **Graph rendering**: Limited to 200 nodes max to ensure smooth interaction
|
|
235
|
-
- **Memory list**: Paginated (50 per page default)
|
|
236
|
-
- **Search**: O(n) vector similarity, fast for <10k memories
|
|
237
|
-
- **Timeline**: Cached for 5 minutes
|
|
238
|
-
|
|
239
|
-
## Security
|
|
240
|
-
|
|
241
|
-
This UI server is intended for **local development** only.
|
|
242
|
-
|
|
243
|
-
**Do NOT expose to public internet without:**
|
|
244
|
-
- Authentication (OAuth, API keys)
|
|
245
|
-
- Input validation and sanitization
|
|
246
|
-
- Rate limiting
|
|
247
|
-
- HTTPS/TLS
|
|
248
|
-
|
|
249
|
-
## Next Steps
|
|
250
|
-
|
|
251
|
-
- Add authentication for multi-user access
|
|
252
|
-
- Implement real-time updates via WebSockets
|
|
253
|
-
- Create memory editing interface
|
|
254
|
-
- Build cluster visualization with hierarchical layout
|
|
255
|
-
- Add CSV export format alongside existing JSON/JSONL/Markdown exports
|
|
256
|
-
|
|
257
|
-
## Support
|
|
258
|
-
|
|
259
|
-
For issues or questions:
|
|
260
|
-
1. Check the main README: `README.md`
|
|
261
|
-
2. Review architecture docs: `docs/architecture/`
|
|
262
|
-
3. Examine demo: `README.md`
|