superlocalmemory 2.7.4 → 2.7.6
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/README.md +1 -1
- package/install.ps1 +226 -0
- package/package.json +4 -3
- package/ui/index.html +3 -0
- package/ui/js/core.js +21 -5
- package/ui/js/profiles.js +29 -7
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://superlocalmemory.com/assets/
|
|
2
|
+
<img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory V2" width="200"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">SuperLocalMemory V2</h1>
|
package/install.ps1
CHANGED
|
@@ -308,6 +308,232 @@ if ($userPath -notlike "*$installBinDir*") {
|
|
|
308
308
|
Write-Host "INFO: PATH already configured" -ForegroundColor Yellow
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
# ============================================================================
|
|
312
|
+
# MCP Auto-Configuration — Detect and configure AI tools
|
|
313
|
+
# ============================================================================
|
|
314
|
+
Write-Host ""
|
|
315
|
+
Write-Host "=================================================================="
|
|
316
|
+
Write-Host " Universal Integration - Auto-Detection "
|
|
317
|
+
Write-Host "=================================================================="
|
|
318
|
+
Write-Host ""
|
|
319
|
+
Write-Host "Detecting installed AI tools..."
|
|
320
|
+
Write-Host ""
|
|
321
|
+
|
|
322
|
+
# Use Continue for MCP section so missing tools don't abort the installer
|
|
323
|
+
$savedErrorAction = $ErrorActionPreference
|
|
324
|
+
$ErrorActionPreference = "Continue"
|
|
325
|
+
|
|
326
|
+
$DETECTED_TOOLS = @()
|
|
327
|
+
|
|
328
|
+
# Helper: configure MCP for a given tool using its template
|
|
329
|
+
function Configure-McpTool {
|
|
330
|
+
param(
|
|
331
|
+
[string]$ToolName,
|
|
332
|
+
[string]$TemplatePath,
|
|
333
|
+
[string]$ConfigPath
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
if (-not (Test-Path $TemplatePath)) {
|
|
337
|
+
Write-Host " WARNING: Template not found for $ToolName — skipping" -ForegroundColor Yellow
|
|
338
|
+
return
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
# Create config directory if needed
|
|
342
|
+
$configDir = Split-Path -Parent $ConfigPath
|
|
343
|
+
if (-not (Test-Path $configDir)) {
|
|
344
|
+
New-Item -ItemType Directory -Path $configDir -Force | Out-Null
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
# Check if already configured
|
|
348
|
+
if ((Test-Path $ConfigPath) -and (Select-String -Path $ConfigPath -Pattern "superlocalmemory" -Quiet -ErrorAction SilentlyContinue)) {
|
|
349
|
+
Write-Host " INFO: $ToolName already configured" -ForegroundColor Yellow
|
|
350
|
+
return
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
# Backup existing config with timestamp
|
|
354
|
+
if (Test-Path $ConfigPath) {
|
|
355
|
+
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
|
|
356
|
+
Copy-Item -Path $ConfigPath -Destination "$ConfigPath.backup.$timestamp" -Force
|
|
357
|
+
Write-Host " OK Backed up existing $ToolName config" -ForegroundColor Green
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
# Read template, substitute install path, fix command for Windows (python not python3)
|
|
361
|
+
$configContent = (Get-Content $TemplatePath -Raw) -replace '\{\{INSTALL_DIR\}\}', ($INSTALL_DIR -replace '\\', '\\')
|
|
362
|
+
$configContent = $configContent -replace '"python3"', '"python"'
|
|
363
|
+
Set-Content -Path $ConfigPath -Value $configContent -Encoding UTF8 -Force
|
|
364
|
+
|
|
365
|
+
Write-Host " OK $ToolName MCP configured" -ForegroundColor Green
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
# Copy MCP server to install directory (ensure it is present)
|
|
369
|
+
$mcpServerSrc = Join-Path $REPO_DIR "mcp_server.py"
|
|
370
|
+
if (Test-Path $mcpServerSrc) {
|
|
371
|
+
Copy-Item -Path $mcpServerSrc -Destination $INSTALL_DIR -Force
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
# --- 1. Claude Desktop ---
|
|
375
|
+
$claudeAppData = Join-Path $env:APPDATA "Claude"
|
|
376
|
+
if (Test-Path $claudeAppData) {
|
|
377
|
+
$DETECTED_TOOLS += "Claude Desktop"
|
|
378
|
+
$template = Join-Path $REPO_DIR "configs\claude-desktop-mcp.json"
|
|
379
|
+
$configDest = Join-Path $claudeAppData "claude_desktop_config.json"
|
|
380
|
+
Configure-McpTool -ToolName "Claude Desktop" -TemplatePath $template -ConfigPath $configDest
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
# --- 2. Cursor ---
|
|
384
|
+
$cursorDir = Join-Path $env:USERPROFILE ".cursor"
|
|
385
|
+
$cursorCmd = Get-Command cursor -ErrorAction SilentlyContinue
|
|
386
|
+
if ((Test-Path $cursorDir) -or $cursorCmd) {
|
|
387
|
+
$DETECTED_TOOLS += "Cursor"
|
|
388
|
+
$template = Join-Path $REPO_DIR "configs\cursor-mcp.json"
|
|
389
|
+
$configDest = Join-Path $cursorDir "mcp_settings.json"
|
|
390
|
+
Configure-McpTool -ToolName "Cursor" -TemplatePath $template -ConfigPath $configDest
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
# --- 3. Windsurf ---
|
|
394
|
+
$windsurfDir = Join-Path $env:USERPROFILE ".windsurf"
|
|
395
|
+
$windsurfCmd = Get-Command windsurf -ErrorAction SilentlyContinue
|
|
396
|
+
if ((Test-Path $windsurfDir) -or $windsurfCmd) {
|
|
397
|
+
$DETECTED_TOOLS += "Windsurf"
|
|
398
|
+
$template = Join-Path $REPO_DIR "configs\windsurf-mcp.json"
|
|
399
|
+
$configDest = Join-Path $windsurfDir "mcp_settings.json"
|
|
400
|
+
Configure-McpTool -ToolName "Windsurf" -TemplatePath $template -ConfigPath $configDest
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
# --- 4. VS Code / GitHub Copilot ---
|
|
404
|
+
$vscodeCmd = Get-Command code -ErrorAction SilentlyContinue
|
|
405
|
+
$vscodeInsidersCmd = Get-Command code-insiders -ErrorAction SilentlyContinue
|
|
406
|
+
if ($vscodeCmd -or $vscodeInsidersCmd) {
|
|
407
|
+
$DETECTED_TOOLS += "VS Code/Copilot"
|
|
408
|
+
$template = Join-Path $REPO_DIR "configs\vscode-copilot-mcp.json"
|
|
409
|
+
$vscodeDir = Join-Path $env:USERPROFILE ".vscode"
|
|
410
|
+
$configDest = Join-Path $vscodeDir "mcp.json"
|
|
411
|
+
Configure-McpTool -ToolName "VS Code/Copilot" -TemplatePath $template -ConfigPath $configDest
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
# --- 5. Gemini CLI ---
|
|
415
|
+
$geminiCmd = Get-Command gemini -ErrorAction SilentlyContinue
|
|
416
|
+
$geminiSettings = Join-Path $env:USERPROFILE ".gemini\settings.json"
|
|
417
|
+
if ($geminiCmd -or (Test-Path $geminiSettings)) {
|
|
418
|
+
$DETECTED_TOOLS += "Gemini CLI"
|
|
419
|
+
$template = Join-Path $REPO_DIR "configs\gemini-cli-mcp.json"
|
|
420
|
+
$geminiDir = Join-Path $env:USERPROFILE ".gemini"
|
|
421
|
+
$configDest = Join-Path $geminiDir "settings.json"
|
|
422
|
+
Configure-McpTool -ToolName "Gemini CLI" -TemplatePath $template -ConfigPath $configDest
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
# --- 6. Codex CLI ---
|
|
426
|
+
$codexDir = Join-Path $env:USERPROFILE ".codex"
|
|
427
|
+
$codexCmd = Get-Command codex -ErrorAction SilentlyContinue
|
|
428
|
+
if ((Test-Path $codexDir) -or $codexCmd) {
|
|
429
|
+
$DETECTED_TOOLS += "Codex CLI"
|
|
430
|
+
|
|
431
|
+
$codexConfigured = $false
|
|
432
|
+
|
|
433
|
+
# Preferred: use native codex mcp add command
|
|
434
|
+
if ($codexCmd) {
|
|
435
|
+
try {
|
|
436
|
+
& codex mcp add superlocalmemory-v2 --env "PYTHONPATH=$INSTALL_DIR" -- python "$INSTALL_DIR\mcp_server.py" 2>$null
|
|
437
|
+
Write-Host " OK Codex CLI MCP configured (via codex mcp add)" -ForegroundColor Green
|
|
438
|
+
$codexConfigured = $true
|
|
439
|
+
} catch {
|
|
440
|
+
# codex mcp add failed — fall through to TOML method
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
# Fallback: write TOML config directly
|
|
445
|
+
if (-not $codexConfigured) {
|
|
446
|
+
$codexConfig = Join-Path $codexDir "config.toml"
|
|
447
|
+
if (-not (Test-Path $codexDir)) {
|
|
448
|
+
New-Item -ItemType Directory -Path $codexDir -Force | Out-Null
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if ((Test-Path $codexConfig) -and (Select-String -Path $codexConfig -Pattern "superlocalmemory-v2" -Quiet -ErrorAction SilentlyContinue)) {
|
|
452
|
+
Write-Host " INFO: Codex CLI already configured" -ForegroundColor Yellow
|
|
453
|
+
} else {
|
|
454
|
+
# Backup existing config
|
|
455
|
+
if (Test-Path $codexConfig) {
|
|
456
|
+
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
|
|
457
|
+
Copy-Item -Path $codexConfig -Destination "$codexConfig.backup.$timestamp" -Force
|
|
458
|
+
Write-Host " OK Backed up existing Codex CLI config" -ForegroundColor Green
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
# Append TOML block
|
|
462
|
+
$tomlBlock = @"
|
|
463
|
+
|
|
464
|
+
[mcp_servers.superlocalmemory-v2]
|
|
465
|
+
command = "python"
|
|
466
|
+
args = ["$INSTALL_DIR\mcp_server.py"]
|
|
467
|
+
|
|
468
|
+
[mcp_servers.superlocalmemory-v2.env]
|
|
469
|
+
PYTHONPATH = "$INSTALL_DIR"
|
|
470
|
+
"@
|
|
471
|
+
Add-Content -Path $codexConfig -Value $tomlBlock -Encoding UTF8
|
|
472
|
+
Write-Host " OK Codex CLI MCP configured (TOML appended)" -ForegroundColor Green
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
# --- 7. Perplexity ---
|
|
478
|
+
$perplexityDir = Join-Path $env:USERPROFILE ".perplexity"
|
|
479
|
+
if (Test-Path $perplexityDir) {
|
|
480
|
+
$DETECTED_TOOLS += "Perplexity"
|
|
481
|
+
$template = Join-Path $REPO_DIR "configs\perplexity-mcp.json"
|
|
482
|
+
$configDest = Join-Path $perplexityDir "mcp.json"
|
|
483
|
+
Configure-McpTool -ToolName "Perplexity" -TemplatePath $template -ConfigPath $configDest
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
# --- 8. OpenCode ---
|
|
487
|
+
$opencodeDir = Join-Path $env:USERPROFILE ".opencode"
|
|
488
|
+
if (Test-Path $opencodeDir) {
|
|
489
|
+
$DETECTED_TOOLS += "OpenCode"
|
|
490
|
+
$template = Join-Path $REPO_DIR "configs\opencode-mcp.json"
|
|
491
|
+
$configDest = Join-Path $opencodeDir "mcp.json"
|
|
492
|
+
Configure-McpTool -ToolName "OpenCode" -TemplatePath $template -ConfigPath $configDest
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
# --- 9. Zed Editor ---
|
|
496
|
+
$zedConfigDir = Join-Path $env:USERPROFILE ".config\zed"
|
|
497
|
+
$zedCmd = Get-Command zed -ErrorAction SilentlyContinue
|
|
498
|
+
if ((Test-Path $zedConfigDir) -or $zedCmd) {
|
|
499
|
+
$DETECTED_TOOLS += "Zed Editor"
|
|
500
|
+
$template = Join-Path $REPO_DIR "configs\zed-mcp.json"
|
|
501
|
+
$configDest = Join-Path $zedConfigDir "context_servers.json"
|
|
502
|
+
Configure-McpTool -ToolName "Zed Editor" -TemplatePath $template -ConfigPath $configDest
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
# Install MCP Python package if not present
|
|
506
|
+
try {
|
|
507
|
+
& python -c "import mcp" 2>$null
|
|
508
|
+
} catch {
|
|
509
|
+
Write-Host ""
|
|
510
|
+
Write-Host "Installing MCP SDK..."
|
|
511
|
+
try {
|
|
512
|
+
& python -m pip install mcp -q 2>$null
|
|
513
|
+
Write-Host "OK MCP SDK installed" -ForegroundColor Green
|
|
514
|
+
} catch {
|
|
515
|
+
Write-Host "INFO: MCP SDK install failed (manual install: python -m pip install mcp)" -ForegroundColor Yellow
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
# Summary of detected tools
|
|
520
|
+
Write-Host ""
|
|
521
|
+
if ($DETECTED_TOOLS.Count -gt 0) {
|
|
522
|
+
Write-Host "OK Detected and configured:" -ForegroundColor Green
|
|
523
|
+
foreach ($tool in $DETECTED_TOOLS) {
|
|
524
|
+
Write-Host " * $tool"
|
|
525
|
+
}
|
|
526
|
+
Write-Host ""
|
|
527
|
+
Write-Host "These tools now have native access to SuperLocalMemory!"
|
|
528
|
+
Write-Host "Restart them to use the new MCP integration."
|
|
529
|
+
} else {
|
|
530
|
+
Write-Host "INFO: No additional AI tools detected" -ForegroundColor Yellow
|
|
531
|
+
Write-Host " MCP server is available if you install Claude Desktop, Cursor, etc."
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
# Restore original error action preference
|
|
535
|
+
$ErrorActionPreference = $savedErrorAction
|
|
536
|
+
|
|
311
537
|
# Summary
|
|
312
538
|
Write-Host ""
|
|
313
539
|
Write-Host "=================================================================="
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.6",
|
|
4
4
|
"description": "Your AI Finally Remembers You - Local-first intelligent memory system for AI assistants. Works with Claude, Cursor, Windsurf, VS Code/Copilot, Codex, and 17+ AI tools. 100% local, zero cloud dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"author": {
|
|
28
28
|
"name": "Varun Pratap Bhardwaj",
|
|
29
|
-
"email": "
|
|
29
|
+
"email": "admin@superlocalmemory.com",
|
|
30
30
|
"url": "https://github.com/varun369"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/varun369/SuperLocalMemoryV2.git"
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://superlocalmemory.com",
|
|
38
|
+
"mcpName": "io.github.varun369/superlocalmemory",
|
|
38
39
|
"bugs": {
|
|
39
40
|
"url": "https://github.com/varun369/SuperLocalMemoryV2/issues"
|
|
40
41
|
},
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
"maintainers": [
|
|
90
91
|
{
|
|
91
92
|
"name": "Varun Pratap Bhardwaj",
|
|
92
|
-
"email": "
|
|
93
|
+
"email": "admin@superlocalmemory.com",
|
|
93
94
|
"url": "https://github.com/varun369"
|
|
94
95
|
}
|
|
95
96
|
],
|
package/ui/index.html
CHANGED
|
@@ -649,6 +649,9 @@
|
|
|
649
649
|
</button>
|
|
650
650
|
</div>
|
|
651
651
|
<span class="text-white-50 d-none d-md-inline" id="navbar-subtitle">Knowledge Graph Explorer</span>
|
|
652
|
+
<button class="btn btn-sm theme-toggle" id="refresh-dashboard-btn" onclick="refreshDashboard()" title="Refresh Dashboard" style="padding:4px 8px;">
|
|
653
|
+
<i class="bi bi-arrow-clockwise" aria-hidden="true"></i>
|
|
654
|
+
</button>
|
|
652
655
|
<button class="theme-toggle" id="theme-toggle" onclick="toggleDarkMode()" aria-label="Toggle dark mode">
|
|
653
656
|
<i class="bi bi-sun-fill" id="theme-icon" aria-hidden="true"></i>
|
|
654
657
|
</button>
|
package/ui/js/core.js
CHANGED
|
@@ -182,16 +182,32 @@ async function loadStats() {
|
|
|
182
182
|
try {
|
|
183
183
|
var response = await fetch('/api/stats');
|
|
184
184
|
var data = await response.json();
|
|
185
|
-
|
|
186
|
-
animateCounter('stat-
|
|
187
|
-
animateCounter('stat-
|
|
188
|
-
animateCounter('stat-
|
|
189
|
-
|
|
185
|
+
var ov = data.overview || {};
|
|
186
|
+
animateCounter('stat-memories', ov.total_memories || 0);
|
|
187
|
+
animateCounter('stat-clusters', ov.total_clusters || 0);
|
|
188
|
+
animateCounter('stat-nodes', ov.graph_nodes || 0);
|
|
189
|
+
animateCounter('stat-edges', ov.graph_edges || 0);
|
|
190
|
+
populateFilters(data.categories || [], data.projects || []);
|
|
190
191
|
} catch (error) {
|
|
191
192
|
console.error('Error loading stats:', error);
|
|
193
|
+
// On error (fresh install, server starting), show 0 instead of "-"
|
|
194
|
+
animateCounter('stat-memories', 0);
|
|
195
|
+
animateCounter('stat-clusters', 0);
|
|
196
|
+
animateCounter('stat-nodes', 0);
|
|
197
|
+
animateCounter('stat-edges', 0);
|
|
192
198
|
}
|
|
193
199
|
}
|
|
194
200
|
|
|
201
|
+
// Refresh entire dashboard — called by the refresh button in the header
|
|
202
|
+
function refreshDashboard() {
|
|
203
|
+
loadProfiles();
|
|
204
|
+
loadStats();
|
|
205
|
+
if (typeof loadGraph === 'function') loadGraph();
|
|
206
|
+
if (typeof loadMemories === 'function') loadMemories();
|
|
207
|
+
if (typeof loadEventStats === 'function') loadEventStats();
|
|
208
|
+
if (typeof loadAgents === 'function') loadAgents();
|
|
209
|
+
}
|
|
210
|
+
|
|
195
211
|
function populateFilters(categories, projects) {
|
|
196
212
|
var categorySelect = document.getElementById('filter-category');
|
|
197
213
|
var projectSelect = document.getElementById('filter-project');
|
package/ui/js/profiles.js
CHANGED
|
@@ -10,15 +10,34 @@ async function loadProfiles() {
|
|
|
10
10
|
var profiles = data.profiles || [];
|
|
11
11
|
var active = data.active_profile || 'default';
|
|
12
12
|
|
|
13
|
-
profiles.
|
|
13
|
+
if (profiles.length === 0) {
|
|
14
|
+
// Fresh install fallback — show default profile
|
|
14
15
|
var opt = document.createElement('option');
|
|
15
|
-
opt.value =
|
|
16
|
-
opt.textContent =
|
|
17
|
-
|
|
16
|
+
opt.value = 'default';
|
|
17
|
+
opt.textContent = 'default (0)';
|
|
18
|
+
opt.selected = true;
|
|
18
19
|
select.appendChild(opt);
|
|
19
|
-
}
|
|
20
|
+
} else {
|
|
21
|
+
profiles.forEach(function(p) {
|
|
22
|
+
var opt = document.createElement('option');
|
|
23
|
+
opt.value = p.name;
|
|
24
|
+
opt.textContent = p.name + ' (' + (p.memory_count || 0) + ')';
|
|
25
|
+
if (p.name === active) opt.selected = true;
|
|
26
|
+
select.appendChild(opt);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
20
29
|
} catch (error) {
|
|
21
30
|
console.error('Error loading profiles:', error);
|
|
31
|
+
// On error, ensure dropdown shows at least 'default'
|
|
32
|
+
var select = document.getElementById('profile-select');
|
|
33
|
+
if (select && select.options.length === 0) {
|
|
34
|
+
select.textContent = '';
|
|
35
|
+
var opt = document.createElement('option');
|
|
36
|
+
opt.value = 'default';
|
|
37
|
+
opt.textContent = 'default';
|
|
38
|
+
opt.selected = true;
|
|
39
|
+
select.appendChild(opt);
|
|
40
|
+
}
|
|
22
41
|
}
|
|
23
42
|
}
|
|
24
43
|
|
|
@@ -53,8 +72,11 @@ async function createProfile(nameOverride) {
|
|
|
53
72
|
showToast('Profile "' + name + '" created');
|
|
54
73
|
var input = document.getElementById('new-profile-name');
|
|
55
74
|
if (input) input.value = '';
|
|
56
|
-
|
|
57
|
-
|
|
75
|
+
// Force reload with small delay to ensure backend has persisted
|
|
76
|
+
setTimeout(function() {
|
|
77
|
+
loadProfiles();
|
|
78
|
+
if (typeof loadProfilesTable === 'function') loadProfilesTable();
|
|
79
|
+
}, 300);
|
|
58
80
|
} catch (error) {
|
|
59
81
|
console.error('Error creating profile:', error);
|
|
60
82
|
showToast('Error creating profile');
|