superlocalmemory 3.6.13 → 3.6.14

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 (124) hide show
  1. package/.claude-plugin/marketplace.json +17 -0
  2. package/README.md +187 -741
  3. package/package.json +12 -5
  4. package/plugin/.claude-plugin/plugin.json +20 -0
  5. package/plugin/.mcp.json +12 -0
  6. package/plugin/CLAUDE.md +43 -0
  7. package/plugin/_GENERATED.md +6 -0
  8. package/plugin/agents/slm-memory-advisor.md +43 -0
  9. package/plugin/agents/slm-optimize-advisor.md +38 -0
  10. package/plugin/hooks/hooks.json +14 -0
  11. package/plugin/requirements.txt +1 -0
  12. package/plugin/scripts/ensure-venv.bat +122 -0
  13. package/plugin/scripts/ensure-venv.sh +105 -0
  14. package/plugin/scripts/slm-launch +15 -0
  15. package/plugin/scripts/slm-launch.bat +17 -0
  16. package/plugin/settings.json +16 -0
  17. package/plugin/skills/slm-cache/SKILL.md +140 -0
  18. package/plugin/skills/slm-compress/SKILL.md +143 -0
  19. package/plugin/skills/slm-graph/SKILL.md +300 -0
  20. package/plugin/skills/slm-recall/SKILL.md +196 -0
  21. package/plugin/skills/slm-remember/SKILL.md +182 -0
  22. package/plugin/skills/slm-session/SKILL.md +207 -0
  23. package/plugin/skills/slm-status/SKILL.md +149 -0
  24. package/plugin-src/.mcp.json +12 -0
  25. package/plugin-src/agents/slm-memory-advisor.md +43 -0
  26. package/plugin-src/agents/slm-optimize-advisor.md +38 -0
  27. package/plugin-src/commands/slm-optimize.md +22 -0
  28. package/plugin-src/commands/slm-recall.md +16 -0
  29. package/plugin-src/commands/slm-remember.md +16 -0
  30. package/plugin-src/commands/slm-status.md +15 -0
  31. package/plugin-src/hooks/.gitkeep +0 -0
  32. package/plugin-src/hooks/hooks.json +14 -0
  33. package/plugin-src/manifest.json +25 -0
  34. package/plugin-src/requirements.txt +1 -0
  35. package/plugin-src/rules/AGENTS.md +90 -0
  36. package/plugin-src/rules/CLAUDE.md.fragment +43 -0
  37. package/plugin-src/scripts/ensure-venv.bat +122 -0
  38. package/plugin-src/scripts/ensure-venv.sh +105 -0
  39. package/plugin-src/scripts/slm-launch +15 -0
  40. package/plugin-src/scripts/slm-launch.bat +17 -0
  41. package/plugin-src/settings.json +16 -0
  42. package/plugin-src/skills/slm-cache/SKILL.md +140 -0
  43. package/plugin-src/skills/slm-compress/SKILL.md +143 -0
  44. package/plugin-src/skills/slm-graph/SKILL.md +300 -0
  45. package/plugin-src/skills/slm-recall/SKILL.md +196 -0
  46. package/plugin-src/skills/slm-remember/SKILL.md +182 -0
  47. package/plugin-src/skills/slm-session/SKILL.md +207 -0
  48. package/plugin-src/skills/slm-status/SKILL.md +149 -0
  49. package/pyproject.toml +6 -2
  50. package/scripts/__tests__/build-plugin.test.mjs +613 -0
  51. package/scripts/_savings_math.py +270 -0
  52. package/scripts/build-plugin.js +742 -0
  53. package/scripts/dogfood_savings.py +490 -0
  54. package/scripts/install-skills.ps1 +4 -334
  55. package/scripts/install-skills.sh +4 -435
  56. package/scripts/postinstall-interactive.js +0 -27
  57. package/scripts/postinstall.js +21 -2
  58. package/src/superlocalmemory/__init__.py +1 -1
  59. package/src/superlocalmemory/cli/_lazy_init.py +115 -0
  60. package/src/superlocalmemory/cli/commands.py +348 -39
  61. package/src/superlocalmemory/cli/main.py +47 -4
  62. package/src/superlocalmemory/cli/setup_wizard.py +20 -6
  63. package/src/superlocalmemory/core/config.py +79 -9
  64. package/src/superlocalmemory/core/embeddings.py +10 -5
  65. package/src/superlocalmemory/core/engine.py +2 -2
  66. package/src/superlocalmemory/hooks/claude_code_hooks.py +27 -3
  67. package/src/superlocalmemory/hooks/portable_kit.py +506 -0
  68. package/src/superlocalmemory/infra/cloud_backup.py +99 -23
  69. package/src/superlocalmemory/mcp/cli_fallback.py +602 -0
  70. package/src/superlocalmemory/mcp/server.py +75 -4
  71. package/src/superlocalmemory/mcp/tools_code_graph.py +3 -3
  72. package/src/superlocalmemory/mcp/tools_core.py +12 -4
  73. package/src/superlocalmemory/optimize/cache/boundary_store.py +25 -6
  74. package/src/superlocalmemory/optimize/cache/centroid_store.py +27 -4
  75. package/src/superlocalmemory/optimize/cache/manager.py +92 -6
  76. package/src/superlocalmemory/optimize/cache/semantic.py +20 -1
  77. package/src/superlocalmemory/optimize/compress/ccr.py +12 -0
  78. package/src/superlocalmemory/optimize/compress/router.py +46 -13
  79. package/src/superlocalmemory/optimize/config/schema.py +6 -0
  80. package/src/superlocalmemory/optimize/proxy/_helpers.py +111 -8
  81. package/src/superlocalmemory/optimize/proxy/anthropic_surface.py +14 -4
  82. package/src/superlocalmemory/optimize/proxy/gemini_surface.py +23 -6
  83. package/src/superlocalmemory/optimize/proxy/openai_surface.py +10 -4
  84. package/src/superlocalmemory/optimize/proxy/server.py +11 -0
  85. package/src/superlocalmemory/optimize/proxy/vertex_surface.py +246 -0
  86. package/src/superlocalmemory/optimize/storage/db.py +30 -0
  87. package/src/superlocalmemory/server/recall_serializer.py +3 -1
  88. package/src/superlocalmemory/server/unified_daemon.py +24 -6
  89. package/src/superlocalmemory/ui/css/legacy-dashboard.css +18 -0
  90. package/src/superlocalmemory/ui/css/neural-glass.css +5 -0
  91. package/src/superlocalmemory/ui/index.html +2 -2
  92. package/src/superlocalmemory/ui/js/core.js +98 -0
  93. package/src/superlocalmemory/ui/js/dashboard.js +8 -1
  94. package/src/superlocalmemory/ui/js/ide-status.js +16 -3
  95. package/src/superlocalmemory/ui/js/math-health.js +15 -3
  96. package/src/superlocalmemory/ui/js/optimize.js +18 -2
  97. package/src/superlocalmemory/ui/js/trust-dashboard.js +10 -1
  98. package/src/superlocalmemory.egg-info/PKG-INFO +189 -742
  99. package/src/superlocalmemory.egg-info/SOURCES.txt +6 -9
  100. package/src/superlocalmemory.egg-info/requires.txt +1 -0
  101. package/ide/skills/slm-build-graph/SKILL.md +0 -423
  102. package/ide/skills/slm-list-recent/SKILL.md +0 -348
  103. package/ide/skills/slm-recall/SKILL.md +0 -326
  104. package/ide/skills/slm-remember/SKILL.md +0 -194
  105. package/ide/skills/slm-show-patterns/SKILL.md +0 -224
  106. package/ide/skills/slm-status/SKILL.md +0 -363
  107. package/ide/skills/slm-switch-profile/SKILL.md +0 -442
  108. package/skills/slm-build-graph/SKILL.md +0 -423
  109. package/skills/slm-list-recent/SKILL.md +0 -348
  110. package/skills/slm-optimize/README.md +0 -55
  111. package/skills/slm-optimize/SKILL.md +0 -139
  112. package/skills/slm-recall/SKILL.md +0 -343
  113. package/skills/slm-remember/SKILL.md +0 -194
  114. package/skills/slm-show-patterns/SKILL.md +0 -224
  115. package/skills/slm-status/SKILL.md +0 -363
  116. package/skills/slm-switch-profile/SKILL.md +0 -442
  117. package/src/superlocalmemory/cli/doctor_cmd.py +0 -152
  118. package/src/superlocalmemory/skills/slm-build-graph/SKILL.md +0 -423
  119. package/src/superlocalmemory/skills/slm-list-recent/SKILL.md +0 -348
  120. package/src/superlocalmemory/skills/slm-recall/SKILL.md +0 -343
  121. package/src/superlocalmemory/skills/slm-remember/SKILL.md +0 -194
  122. package/src/superlocalmemory/skills/slm-show-patterns/SKILL.md +0 -224
  123. package/src/superlocalmemory/skills/slm-status/SKILL.md +0 -363
  124. package/src/superlocalmemory/skills/slm-switch-profile/SKILL.md +0 -442
@@ -1,334 +1,4 @@
1
- # SuperLocalMemory V2 - Universal Skills Installer (PowerShell)
2
- # Installs skills for Claude Code, Codex, Gemini CLI, Antigravity, and Windsurf
3
-
4
- param(
5
- [switch]$Auto
6
- )
7
-
8
- $ErrorActionPreference = "Stop"
9
-
10
- # Configuration
11
- $REPO_DIR = $PSScriptRoot
12
- $SKILLS_SOURCE = Join-Path $REPO_DIR "skills"
13
-
14
- # Tool definitions
15
- $TOOL_IDS = @("claude_code", "codex", "gemini_cli", "antigravity", "windsurf", "cursor", "vscode_copilot")
16
- $TOOL_NAMES = @("Claude Code", "Codex", "Gemini CLI", "Antigravity", "Windsurf", "Cursor", "VS Code/Copilot")
17
- $TOOL_DIRS = @(
18
- (Join-Path $env:USERPROFILE ".claude\skills"),
19
- (Join-Path $env:USERPROFILE ".codex\skills"),
20
- (Join-Path $env:USERPROFILE ".gemini\skills"),
21
- (Join-Path $env:USERPROFILE ".gemini\antigravity\skills"),
22
- (Join-Path $env:USERPROFILE ".windsurf\skills"),
23
- (Join-Path $env:USERPROFILE ".cursor\skills"),
24
- (Join-Path $env:USERPROFILE ".copilot\skills")
25
- )
26
-
27
- # Helper functions
28
- function Get-ToolName {
29
- param([string]$ToolId)
30
- $index = $TOOL_IDS.IndexOf($ToolId)
31
- if ($index -ge 0) { return $TOOL_NAMES[$index] }
32
- return $ToolId
33
- }
34
-
35
- function Get-ToolDir {
36
- param([string]$ToolId)
37
- $index = $TOOL_IDS.IndexOf($ToolId)
38
- if ($index -ge 0) { return $TOOL_DIRS[$index] }
39
- return ""
40
- }
41
-
42
- # Skills to install
43
- $SKILLS = @(
44
- "slm-remember",
45
- "slm-recall",
46
- "slm-status",
47
- "slm-list-recent",
48
- "slm-build-graph",
49
- "slm-switch-profile"
50
- )
51
-
52
- Write-Host "=========================================="
53
- Write-Host "SuperLocalMemory V2 - Universal Skills Installer"
54
- Write-Host "=========================================="
55
- Write-Host ""
56
-
57
- # Check if SuperLocalMemory V2 is installed
58
- $memoryDir = Join-Path $env:USERPROFILE ".superlocalmemory"
59
- if (-not (Test-Path $memoryDir)) {
60
- Write-Host "Warning: SuperLocalMemory V2 not found at $memoryDir" -ForegroundColor Yellow
61
- Write-Host "Skills require SuperLocalMemory V2 to be installed first."
62
- Write-Host ""
63
- if (-not $Auto) {
64
- $response = Read-Host "Do you want to continue anyway? (y/n)"
65
- if ($response -ne "y" -and $response -ne "Y") {
66
- Write-Host "Installation cancelled."
67
- Write-Host "Please install SuperLocalMemory V2 first: .\install.ps1"
68
- exit 1
69
- }
70
- } else {
71
- Write-Host "Auto mode: continuing anyway..."
72
- }
73
- }
74
-
75
- # Check if skills source directory exists
76
- if (-not (Test-Path $SKILLS_SOURCE)) {
77
- Write-Host "Error: Skills directory not found: $SKILLS_SOURCE" -ForegroundColor Red
78
- Write-Host "Please run this script from the superlocalmemory-repo directory."
79
- exit 1
80
- }
81
-
82
- # Verify all skill directories exist
83
- Write-Host "Verifying skill files..."
84
- $MISSING_SKILLS = 0
85
- foreach ($skill in $SKILLS) {
86
- $skillDir = Join-Path $SKILLS_SOURCE $skill
87
- $skillFile = Join-Path $skillDir "SKILL.md"
88
- if (-not (Test-Path $skillDir)) {
89
- Write-Host "✗ Missing: $skill/" -ForegroundColor Red
90
- $MISSING_SKILLS++
91
- } elseif (-not (Test-Path $skillFile)) {
92
- Write-Host "✗ Missing: $skill/SKILL.md" -ForegroundColor Red
93
- $MISSING_SKILLS++
94
- } else {
95
- Write-Host "✓ Found: $skill/SKILL.md" -ForegroundColor Green
96
- }
97
- }
98
-
99
- if ($MISSING_SKILLS -gt 0) {
100
- Write-Host "Error: $MISSING_SKILLS skill(s) missing. Cannot proceed." -ForegroundColor Red
101
- exit 1
102
- }
103
-
104
- Write-Host ""
105
- Write-Host "Found $($SKILLS.Count) skills to install"
106
- Write-Host ""
107
-
108
- # Detect available tools
109
- Write-Host "=========================================="
110
- Write-Host "Detecting AI Tools"
111
- Write-Host "=========================================="
112
- Write-Host ""
113
-
114
- $DETECTED_TOOLS = @()
115
-
116
- for ($i = 0; $i -lt $TOOL_IDS.Count; $i++) {
117
- $toolId = $TOOL_IDS[$i]
118
- $toolName = $TOOL_NAMES[$i]
119
- $toolDir = $TOOL_DIRS[$i]
120
- $parentDir = Split-Path $toolDir -Parent
121
-
122
- if (Test-Path $parentDir) {
123
- Write-Host "✓ $toolName detected: $toolDir" -ForegroundColor Green
124
- $DETECTED_TOOLS += $toolId
125
- } else {
126
- Write-Host "○ $toolName not found: $parentDir" -ForegroundColor Blue
127
- }
128
- }
129
-
130
- Write-Host ""
131
-
132
- if ($DETECTED_TOOLS.Count -eq 0) {
133
- if ($Auto) {
134
- Write-Host "Warning: No supported AI tools detected. Skipping skills installation." -ForegroundColor Yellow
135
- Write-Host ""
136
- exit 0
137
- }
138
- Write-Host "Warning: No supported AI tools detected." -ForegroundColor Yellow
139
- Write-Host ""
140
- Write-Host "Supported tools:"
141
- for ($i = 0; $i -lt $TOOL_IDS.Count; $i++) {
142
- Write-Host " - $($TOOL_NAMES[$i]): $($TOOL_DIRS[$i])"
143
- }
144
- Write-Host ""
145
- $response = Read-Host "Do you want to continue and create directories anyway? (y/n)"
146
- if ($response -ne "y" -and $response -ne "Y") {
147
- Write-Host "Installation cancelled."
148
- exit 1
149
- }
150
- # Add all tools to install list
151
- $DETECTED_TOOLS = $TOOL_IDS
152
- } else {
153
- Write-Host "Will install skills for $($DETECTED_TOOLS.Count) tool(s)"
154
- Write-Host ""
155
- }
156
-
157
- # Ask user for installation method
158
- if ($Auto) {
159
- $METHOD = "copy" # Windows: copy is more reliable than symlink
160
- Write-Host "Auto mode: Using copy method..."
161
- } else {
162
- Write-Host "Installation Methods:"
163
- Write-Host " 1. Copy - Stable, requires manual updates (recommended for Windows)"
164
- Write-Host " 2. Symlink - Changes in repo reflect immediately (requires admin on Windows)"
165
- Write-Host ""
166
- $choice = Read-Host "Choose installation method (1 or 2)"
167
- Write-Host ""
168
-
169
- if ($choice -eq "1") {
170
- $METHOD = "copy"
171
- Write-Host "Installing via copy..."
172
- } elseif ($choice -eq "2") {
173
- $METHOD = "symlink"
174
- Write-Host "Installing via symlink..."
175
- } else {
176
- Write-Host "Invalid choice. Please enter 1 or 2." -ForegroundColor Red
177
- exit 1
178
- }
179
- }
180
-
181
- Write-Host ""
182
-
183
- # Install skills for each detected tool
184
- $TOTAL_INSTALLED = 0
185
- $TOTAL_FAILED = 0
186
- $TOTAL_SKIPPED = 0
187
-
188
- foreach ($toolId in $DETECTED_TOOLS) {
189
- $toolName = Get-ToolName $toolId
190
- Write-Host "=========================================="
191
- Write-Host "Installing for: $toolName"
192
- Write-Host "=========================================="
193
-
194
- $skillsDir = Get-ToolDir $toolId
195
-
196
- # Create skills directory if it doesn't exist
197
- if (-not (Test-Path $skillsDir)) {
198
- Write-Host "Creating directory: $skillsDir"
199
- try {
200
- New-Item -ItemType Directory -Path $skillsDir -Force | Out-Null
201
- Write-Host "✓ Directory created" -ForegroundColor Green
202
- } catch {
203
- Write-Host "✗ Failed to create directory" -ForegroundColor Red
204
- Write-Host ""
205
- $TOTAL_SKIPPED += $SKILLS.Count
206
- continue
207
- }
208
- } else {
209
- Write-Host "Directory exists: $skillsDir"
210
- }
211
-
212
- Write-Host ""
213
-
214
- # Install each skill
215
- foreach ($skill in $SKILLS) {
216
- $sourceFile = Join-Path (Join-Path $SKILLS_SOURCE $skill) "SKILL.md"
217
- $targetFile = Join-Path $skillsDir "$skill.md"
218
-
219
- # Remove existing file or symlink
220
- if (Test-Path $targetFile) {
221
- Remove-Item $targetFile -Force
222
- }
223
-
224
- try {
225
- if ($METHOD -eq "symlink") {
226
- # Create symlink (requires admin on Windows)
227
- New-Item -ItemType SymbolicLink -Path $targetFile -Target $sourceFile -Force | Out-Null
228
- Write-Host "✓ Symlinked: $skill.md" -ForegroundColor Green
229
- $TOTAL_INSTALLED++
230
- } else {
231
- # Copy file
232
- Copy-Item $sourceFile -Destination $targetFile -Force
233
- Write-Host "✓ Copied: $skill.md" -ForegroundColor Green
234
- $TOTAL_INSTALLED++
235
- }
236
- } catch {
237
- Write-Host "✗ Failed to install: $skill.md - $($_.Exception.Message)" -ForegroundColor Red
238
- $TOTAL_FAILED++
239
- }
240
- }
241
-
242
- Write-Host ""
243
- }
244
-
245
- # Installation Summary
246
- Write-Host "=========================================="
247
- Write-Host "Installation Summary"
248
- Write-Host "=========================================="
249
- Write-Host ""
250
- Write-Host "Tools configured: $($DETECTED_TOOLS.Count)" -ForegroundColor Blue
251
- Write-Host "Skills installed: $TOTAL_INSTALLED" -ForegroundColor Green
252
- if ($TOTAL_FAILED -gt 0) {
253
- Write-Host "Failed: $TOTAL_FAILED" -ForegroundColor Red
254
- }
255
- if ($TOTAL_SKIPPED -gt 0) {
256
- Write-Host "Skipped: $TOTAL_SKIPPED" -ForegroundColor Yellow
257
- }
258
- Write-Host "Installation method: $METHOD"
259
- Write-Host ""
260
-
261
- # List installation locations
262
- Write-Host "Skills installed to:"
263
- foreach ($toolId in $DETECTED_TOOLS) {
264
- $toolName = Get-ToolName $toolId
265
- $toolDir = Get-ToolDir $toolId
266
- if ((Test-Path $toolDir) -and ((Get-ChildItem -Path $toolDir -Filter "*.md" -ErrorAction SilentlyContinue).Count -gt 0)) {
267
- $count = (Get-ChildItem -Path $toolDir -Filter "*.md").Count
268
- Write-Host " ✓ $toolName`: $toolDir ($count skills)" -ForegroundColor Green
269
- }
270
- }
271
-
272
- Write-Host ""
273
-
274
- # Verify installation
275
- $EXPECTED_TOTAL = $DETECTED_TOOLS.Count * $SKILLS.Count
276
- if ($TOTAL_INSTALLED -eq $EXPECTED_TOTAL) {
277
- Write-Host "✓ All skills installed successfully!" -ForegroundColor Green
278
- } else {
279
- Write-Host "⚠ Some skills failed to install." -ForegroundColor Yellow
280
- Write-Host "Expected: $EXPECTED_TOTAL, Installed: $TOTAL_INSTALLED"
281
- }
282
-
283
- Write-Host ""
284
-
285
- # List available skills
286
- Write-Host "=========================================="
287
- Write-Host "Available Skills"
288
- Write-Host "=========================================="
289
- Write-Host ""
290
- foreach ($skill in $SKILLS) {
291
- Write-Host " • $skill"
292
- }
293
- Write-Host ""
294
-
295
- # Next Steps
296
- Write-Host "=========================================="
297
- Write-Host "Next Steps"
298
- Write-Host "=========================================="
299
- Write-Host ""
300
- Write-Host "1. Restart your AI tool to load the new skills" -ForegroundColor Yellow
301
- Write-Host ""
302
- Write-Host "2. Verify skills are loaded:"
303
- foreach ($toolId in $DETECTED_TOOLS) {
304
- $toolName = Get-ToolName $toolId
305
- Write-Host " $toolName (check available commands/skills)" -ForegroundColor Green
306
- }
307
- Write-Host ""
308
- Write-Host "3. Try your first skill:"
309
- Write-Host " /slm-status or /slm-remember `"test`"" -ForegroundColor Green
310
- Write-Host ""
311
- Write-Host "4. Read skill documentation:"
312
- Write-Host " Each skill has detailed docs in: $SKILLS_SOURCE\<skill-name>\SKILL.md"
313
- Write-Host ""
314
-
315
- if ($METHOD -eq "copy") {
316
- Write-Host "Note: Using copies. To update skills:"
317
- Write-Host " cd $REPO_DIR"
318
- Write-Host " git pull"
319
- Write-Host " .\install-skills.ps1"
320
- Write-Host ""
321
- }
322
-
323
- Write-Host "=========================================="
324
- Write-Host ""
325
- Write-Host "✓ Universal skills installation complete!" -ForegroundColor Green
326
- Write-Host ""
327
- Write-Host "Skills installed for:"
328
- foreach ($toolId in $DETECTED_TOOLS) {
329
- Write-Host " • $(Get-ToolName $toolId)"
330
- }
331
- Write-Host ""
332
- Write-Host "Remember: Skills are OPTIONAL convenience wrappers."
333
- Write-Host "SuperLocalMemory V2 works standalone via terminal commands."
334
- Write-Host ""
1
+ # DEPRECATED in v3.6.14 skills are now delivered via the Claude Code plugin.
2
+ # Use: claude plugin install superlocalmemory@qualixar
3
+ Write-Output "SLM skills are now delivered via the Claude Code plugin (/plugin install) — standalone skill install is retired in v3.6.14."
4
+ exit 0