superlocalmemory 3.4.4 → 3.4.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.
- package/README.md +4 -11
- package/ide/hooks/tool-event-hook.sh +46 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/attribution/mathematical_dna.py +1 -1
- package/src/superlocalmemory/attribution/signer.py +1 -1
- package/src/superlocalmemory/attribution/watermark.py +1 -1
- package/src/superlocalmemory/cli/__init__.py +1 -1
- package/src/superlocalmemory/cli/commands.py +1 -1
- package/src/superlocalmemory/cli/daemon.py +56 -26
- package/src/superlocalmemory/cli/json_output.py +1 -1
- package/src/superlocalmemory/cli/main.py +1 -1
- package/src/superlocalmemory/cli/migrate_cmd.py +1 -1
- package/src/superlocalmemory/cli/pending_store.py +1 -1
- package/src/superlocalmemory/cli/post_install.py +1 -1
- package/src/superlocalmemory/cli/service_installer.py +1 -1
- package/src/superlocalmemory/cli/setup_wizard.py +1 -1
- package/src/superlocalmemory/code_graph/__init__.py +1 -1
- package/src/superlocalmemory/code_graph/blast_radius.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/__init__.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/entity_resolver.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/event_listeners.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/fact_enricher.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/hebbian_linker.py +1 -1
- package/src/superlocalmemory/code_graph/bridge/temporal_checker.py +1 -1
- package/src/superlocalmemory/code_graph/changes.py +1 -1
- package/src/superlocalmemory/code_graph/communities.py +1 -1
- package/src/superlocalmemory/code_graph/config.py +1 -1
- package/src/superlocalmemory/code_graph/database.py +1 -1
- package/src/superlocalmemory/code_graph/extractors/__init__.py +1 -1
- package/src/superlocalmemory/code_graph/extractors/python.py +1 -1
- package/src/superlocalmemory/code_graph/extractors/typescript.py +1 -1
- package/src/superlocalmemory/code_graph/flows.py +1 -1
- package/src/superlocalmemory/code_graph/git_hooks.py +1 -1
- package/src/superlocalmemory/code_graph/graph_engine.py +1 -1
- package/src/superlocalmemory/code_graph/graph_store.py +1 -1
- package/src/superlocalmemory/code_graph/incremental.py +1 -1
- package/src/superlocalmemory/code_graph/models.py +1 -1
- package/src/superlocalmemory/code_graph/parser.py +1 -1
- package/src/superlocalmemory/code_graph/resolver.py +1 -1
- package/src/superlocalmemory/code_graph/search.py +1 -1
- package/src/superlocalmemory/code_graph/service.py +1 -1
- package/src/superlocalmemory/code_graph/watcher.py +1 -1
- package/src/superlocalmemory/compliance/abac.py +1 -1
- package/src/superlocalmemory/compliance/audit.py +1 -1
- package/src/superlocalmemory/compliance/eu_ai_act.py +1 -1
- package/src/superlocalmemory/compliance/gdpr.py +1 -1
- package/src/superlocalmemory/compliance/lifecycle.py +1 -1
- package/src/superlocalmemory/compliance/retention.py +1 -1
- package/src/superlocalmemory/compliance/scheduler.py +1 -1
- package/src/superlocalmemory/core/config.py +1 -1
- package/src/superlocalmemory/core/consolidation_engine.py +52 -1
- package/src/superlocalmemory/core/embedding_worker.py +1 -1
- package/src/superlocalmemory/core/embeddings.py +1 -1
- package/src/superlocalmemory/core/engine.py +17 -1
- package/src/superlocalmemory/core/engine_wiring.py +21 -1
- package/src/superlocalmemory/core/graph_analyzer.py +15 -1
- package/src/superlocalmemory/core/health_monitor.py +1 -1
- package/src/superlocalmemory/core/hooks.py +1 -1
- package/src/superlocalmemory/core/maintenance.py +1 -1
- package/src/superlocalmemory/core/maintenance_scheduler.py +1 -1
- package/src/superlocalmemory/core/modes.py +1 -1
- package/src/superlocalmemory/core/ollama_embedder.py +1 -1
- package/src/superlocalmemory/core/profiles.py +1 -1
- package/src/superlocalmemory/core/recall_pipeline.py +16 -3
- package/src/superlocalmemory/core/recall_worker.py +1 -1
- package/src/superlocalmemory/core/registry.py +1 -1
- package/src/superlocalmemory/core/reranker_worker.py +1 -1
- package/src/superlocalmemory/core/store_pipeline.py +1 -1
- package/src/superlocalmemory/core/summarizer.py +1 -1
- package/src/superlocalmemory/core/worker_pool.py +1 -1
- package/src/superlocalmemory/dynamics/activation_guided_quantization.py +1 -1
- package/src/superlocalmemory/dynamics/eap_scheduler.py +1 -1
- package/src/superlocalmemory/dynamics/ebbinghaus_langevin_coupling.py +1 -1
- package/src/superlocalmemory/dynamics/fisher_langevin_coupling.py +1 -1
- package/src/superlocalmemory/encoding/auto_linker.py +1 -1
- package/src/superlocalmemory/encoding/cognitive_consolidator.py +1 -1
- package/src/superlocalmemory/encoding/consolidator.py +1 -1
- package/src/superlocalmemory/encoding/context_generator.py +1 -1
- package/src/superlocalmemory/encoding/emotional.py +1 -1
- package/src/superlocalmemory/encoding/entity_resolver.py +1 -1
- package/src/superlocalmemory/encoding/entropy_gate.py +1 -1
- package/src/superlocalmemory/encoding/fact_extractor.py +1 -1
- package/src/superlocalmemory/encoding/foresight.py +1 -1
- package/src/superlocalmemory/encoding/graph_builder.py +1 -1
- package/src/superlocalmemory/encoding/observation_builder.py +1 -1
- package/src/superlocalmemory/encoding/scene_builder.py +1 -1
- package/src/superlocalmemory/encoding/signal_inference.py +1 -1
- package/src/superlocalmemory/encoding/temporal_parser.py +1 -1
- package/src/superlocalmemory/encoding/temporal_validator.py +1 -1
- package/src/superlocalmemory/encoding/type_router.py +1 -1
- package/src/superlocalmemory/hooks/__init__.py +1 -1
- package/src/superlocalmemory/hooks/auto_capture.py +1 -1
- package/src/superlocalmemory/hooks/auto_invoker.py +1 -1
- package/src/superlocalmemory/hooks/auto_parameterize.py +1 -1
- package/src/superlocalmemory/hooks/auto_recall.py +1 -1
- package/src/superlocalmemory/hooks/claude_code_hooks.py +1 -1
- package/src/superlocalmemory/hooks/hook_handlers.py +1 -1
- package/src/superlocalmemory/hooks/ide_connector.py +1 -1
- package/src/superlocalmemory/hooks/rules_engine.py +1 -1
- package/src/superlocalmemory/infra/__init__.py +1 -1
- package/src/superlocalmemory/infra/auth_middleware.py +1 -1
- package/src/superlocalmemory/infra/backup.py +1 -1
- package/src/superlocalmemory/infra/cache_manager.py +1 -1
- package/src/superlocalmemory/infra/event_bus.py +1 -1
- package/src/superlocalmemory/infra/heartbeat_monitor.py +1 -1
- package/src/superlocalmemory/infra/pid_manager.py +1 -1
- package/src/superlocalmemory/infra/process_reaper.py +1 -1
- package/src/superlocalmemory/infra/rate_limiter.py +1 -1
- package/src/superlocalmemory/infra/webhook_dispatcher.py +1 -1
- package/src/superlocalmemory/ingestion/__init__.py +1 -1
- package/src/superlocalmemory/ingestion/adapter_manager.py +1 -1
- package/src/superlocalmemory/ingestion/base_adapter.py +1 -1
- package/src/superlocalmemory/ingestion/calendar_adapter.py +1 -1
- package/src/superlocalmemory/ingestion/credentials.py +1 -1
- package/src/superlocalmemory/ingestion/gmail_adapter.py +1 -1
- package/src/superlocalmemory/ingestion/parsers.py +1 -1
- package/src/superlocalmemory/ingestion/transcript_adapter.py +1 -1
- package/src/superlocalmemory/learning/adaptive.py +1 -1
- package/src/superlocalmemory/learning/assertion_miner.py +310 -0
- package/src/superlocalmemory/learning/behavioral.py +1 -1
- package/src/superlocalmemory/learning/behavioral_listener.py +1 -1
- package/src/superlocalmemory/learning/bootstrap.py +1 -1
- package/src/superlocalmemory/learning/consolidation_quantization_worker.py +1 -1
- package/src/superlocalmemory/learning/consolidation_worker.py +25 -9
- package/src/superlocalmemory/learning/cross_project.py +1 -1
- package/src/superlocalmemory/learning/database.py +1 -1
- package/src/superlocalmemory/learning/entity_compiler.py +1 -1
- package/src/superlocalmemory/learning/features.py +1 -1
- package/src/superlocalmemory/learning/forgetting_scheduler.py +1 -1
- package/src/superlocalmemory/learning/outcomes.py +1 -1
- package/src/superlocalmemory/learning/project_context.py +1 -1
- package/src/superlocalmemory/learning/quantization_scheduler.py +1 -1
- package/src/superlocalmemory/learning/ranker.py +1 -1
- package/src/superlocalmemory/learning/signals.py +1 -1
- package/src/superlocalmemory/learning/workflows.py +1 -1
- package/src/superlocalmemory/llm/backbone.py +1 -1
- package/src/superlocalmemory/math/ebbinghaus.py +1 -1
- package/src/superlocalmemory/math/fisher.py +1 -1
- package/src/superlocalmemory/math/fisher_quantized.py +1 -1
- package/src/superlocalmemory/math/hopfield.py +1 -1
- package/src/superlocalmemory/math/langevin.py +1 -1
- package/src/superlocalmemory/math/polar_quant.py +1 -1
- package/src/superlocalmemory/math/qjl.py +1 -1
- package/src/superlocalmemory/math/sheaf.py +1 -1
- package/src/superlocalmemory/math/turbo_quant.py +1 -1
- package/src/superlocalmemory/mcp/resources.py +1 -1
- package/src/superlocalmemory/mcp/server.py +17 -2
- package/src/superlocalmemory/mcp/shared.py +1 -1
- package/src/superlocalmemory/mcp/tools.py +1 -1
- package/src/superlocalmemory/mcp/tools_active.py +1 -1
- package/src/superlocalmemory/mcp/tools_code_graph.py +1 -1
- package/src/superlocalmemory/mcp/tools_core.py +1 -1
- package/src/superlocalmemory/mcp/tools_learning.py +221 -0
- package/src/superlocalmemory/mcp/tools_mesh.py +55 -12
- package/src/superlocalmemory/mcp/tools_v28.py +23 -1
- package/src/superlocalmemory/mcp/tools_v3.py +1 -1
- package/src/superlocalmemory/mcp/tools_v33.py +1 -1
- package/src/superlocalmemory/mesh/__init__.py +1 -1
- package/src/superlocalmemory/mesh/broker.py +194 -38
- package/src/superlocalmemory/parameterization/__init__.py +1 -1
- package/src/superlocalmemory/parameterization/pattern_extractor.py +35 -1
- package/src/superlocalmemory/parameterization/pii_filter.py +1 -1
- package/src/superlocalmemory/parameterization/prompt_injector.py +1 -1
- package/src/superlocalmemory/parameterization/prompt_lifecycle.py +1 -1
- package/src/superlocalmemory/parameterization/soft_prompt_generator.py +7 -1
- package/src/superlocalmemory/retrieval/agentic.py +1 -1
- package/src/superlocalmemory/retrieval/ann_index.py +1 -1
- package/src/superlocalmemory/retrieval/bm25_channel.py +1 -1
- package/src/superlocalmemory/retrieval/bridge_discovery.py +1 -1
- package/src/superlocalmemory/retrieval/channel_registry.py +1 -1
- package/src/superlocalmemory/retrieval/engine.py +1 -1
- package/src/superlocalmemory/retrieval/entity_channel.py +1 -1
- package/src/superlocalmemory/retrieval/forgetting_filter.py +1 -1
- package/src/superlocalmemory/retrieval/fusion.py +1 -1
- package/src/superlocalmemory/retrieval/hopfield_channel.py +1 -1
- package/src/superlocalmemory/retrieval/profile_channel.py +1 -1
- package/src/superlocalmemory/retrieval/quantization_aware_search.py +1 -1
- package/src/superlocalmemory/retrieval/reranker.py +1 -1
- package/src/superlocalmemory/retrieval/semantic_channel.py +1 -1
- package/src/superlocalmemory/retrieval/spreading_activation.py +1 -1
- package/src/superlocalmemory/retrieval/strategy.py +1 -1
- package/src/superlocalmemory/retrieval/temporal_channel.py +1 -1
- package/src/superlocalmemory/retrieval/vector_store.py +1 -1
- package/src/superlocalmemory/server/api.py +1 -1
- package/src/superlocalmemory/server/routes/__init__.py +1 -1
- package/src/superlocalmemory/server/routes/adapters.py +1 -1
- package/src/superlocalmemory/server/routes/agents.py +2 -2
- package/src/superlocalmemory/server/routes/backup.py +2 -2
- package/src/superlocalmemory/server/routes/behavioral.py +125 -2
- package/src/superlocalmemory/server/routes/compliance.py +2 -2
- package/src/superlocalmemory/server/routes/data_io.py +2 -2
- package/src/superlocalmemory/server/routes/entity.py +1 -1
- package/src/superlocalmemory/server/routes/events.py +2 -2
- package/src/superlocalmemory/server/routes/helpers.py +2 -2
- package/src/superlocalmemory/server/routes/ingest.py +1 -1
- package/src/superlocalmemory/server/routes/learning.py +2 -2
- package/src/superlocalmemory/server/routes/lifecycle.py +2 -2
- package/src/superlocalmemory/server/routes/memories.py +2 -2
- package/src/superlocalmemory/server/routes/mesh.py +25 -7
- package/src/superlocalmemory/server/routes/profiles.py +2 -2
- package/src/superlocalmemory/server/routes/stats.py +26 -7
- package/src/superlocalmemory/server/routes/v3_api.py +1 -1
- package/src/superlocalmemory/server/routes/ws.py +2 -2
- package/src/superlocalmemory/server/ui.py +1 -1
- package/src/superlocalmemory/server/unified_daemon.py +42 -1
- package/src/superlocalmemory/storage/access_control.py +1 -1
- package/src/superlocalmemory/storage/access_log.py +1 -1
- package/src/superlocalmemory/storage/database.py +1 -1
- package/src/superlocalmemory/storage/embedding_migrator.py +1 -1
- package/src/superlocalmemory/storage/migration_v33.py +1 -1
- package/src/superlocalmemory/storage/migrations.py +1 -1
- package/src/superlocalmemory/storage/models.py +1 -1
- package/src/superlocalmemory/storage/quantized_store.py +1 -1
- package/src/superlocalmemory/storage/schema.py +1 -1
- package/src/superlocalmemory/storage/schema_code_graph.py +1 -1
- package/src/superlocalmemory/storage/schema_v32.py +1 -1
- package/src/superlocalmemory/storage/schema_v343.py +75 -1
- package/src/superlocalmemory/storage/schema_v347.py +136 -0
- package/src/superlocalmemory/storage/v2_migrator.py +1 -1
- package/src/superlocalmemory/trust/gate.py +1 -1
- package/src/superlocalmemory/trust/provenance.py +1 -1
- package/src/superlocalmemory/trust/scorer.py +1 -1
- package/src/superlocalmemory/trust/signals.py +1 -1
- package/src/superlocalmemory/ui/index.html +7 -7
- package/src/superlocalmemory/ui/js/behavioral.js +174 -3
- package/src/superlocalmemory.egg-info/PKG-INFO +5 -12
- package/src/superlocalmemory.egg-info/SOURCES.txt +3 -0
package/README.md
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
<a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/CLI-Agent--Native-green?style=for-the-badge" alt="CLI Agent-Native"/></a>
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
|
+
<p align="center">
|
|
26
|
+
<video src="https://github.com/user-attachments/assets/c3b54a1d-f62a-4ea7-bba7-900435e7b3ab" width="800" autoplay loop muted playsinline></video>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
25
29
|
---
|
|
26
30
|
|
|
27
31
|
## Why SuperLocalMemory?
|
|
@@ -339,17 +343,6 @@ Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-
|
|
|
339
343
|
slm dashboard # Opens at http://localhost:8765
|
|
340
344
|
```
|
|
341
345
|
|
|
342
|
-
<details open>
|
|
343
|
-
<summary><strong>Dashboard Demo — v3.4.4 "Neural Glass"</strong> (click to collapse)</summary>
|
|
344
|
-
<p align="center">
|
|
345
|
-
<a href="https://github.com/qualixar/superlocalmemory/issues/15">
|
|
346
|
-
<video src="https://github.com/user-attachments/assets/c3b54a1d-f62a-4ea7-bba7-900435e7b3ab" width="800" autoplay loop muted playsinline>
|
|
347
|
-
Your browser does not support the video tag. <a href="https://github.com/qualixar/superlocalmemory/issues/15">Watch the demo</a>.
|
|
348
|
-
</video>
|
|
349
|
-
</a>
|
|
350
|
-
</p>
|
|
351
|
-
</details>
|
|
352
|
-
|
|
353
346
|
**v3.4.4 "Neural Glass":** 21-tab sidebar dashboard with light + dark theme. Knowledge Graph (Sigma.js WebGL, community detection), Health Monitor, Entity Explorer (1,300+ entities), Mesh Peers (P2P agent communication), Ingestion Status (Gmail/Calendar/Transcript management), Privacy blur mode. Always-on daemon with auto-start. 8 mesh MCP tools built-in. Cross-platform: macOS + Windows + Linux. All data stays local.
|
|
354
347
|
|
|
355
348
|
---
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SuperLocalMemory V3.4.7 — Tool Event Learning Hook
|
|
3
|
+
# Copyright (c) 2026 Varun Pratap Bhardwaj
|
|
4
|
+
# Licensed under AGPL-3.0-or-later
|
|
5
|
+
#
|
|
6
|
+
# PostToolUse hook that logs tool events to SLM for behavioral learning.
|
|
7
|
+
# Fires after every tool call. Lightweight — no LLM calls, just HTTP POST.
|
|
8
|
+
# All data stays 100% local.
|
|
9
|
+
#
|
|
10
|
+
# Installation: slm init (auto-registers) or manually add to settings.json:
|
|
11
|
+
# { "type": "PostToolUse", "matcher": "*",
|
|
12
|
+
# "command": "bash /path/to/tool-event-hook.sh",
|
|
13
|
+
# "timeout": 5000 }
|
|
14
|
+
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
# Read stdin (Claude Code passes JSON with tool_name, input, output)
|
|
18
|
+
INPUT=$(cat)
|
|
19
|
+
|
|
20
|
+
# Extract tool name and event info
|
|
21
|
+
TOOL_NAME=$(echo "$INPUT" | python3 -c "
|
|
22
|
+
import sys, json
|
|
23
|
+
try:
|
|
24
|
+
d = json.load(sys.stdin)
|
|
25
|
+
print(d.get('tool_name', d.get('tool', 'unknown')))
|
|
26
|
+
except:
|
|
27
|
+
print('unknown')
|
|
28
|
+
" 2>/dev/null || echo "unknown")
|
|
29
|
+
|
|
30
|
+
# Skip logging for our own tools (avoid recursion)
|
|
31
|
+
case "$TOOL_NAME" in
|
|
32
|
+
log_tool_event|get_assertions|reinforce_assertion|contradict_assertion)
|
|
33
|
+
exit 0
|
|
34
|
+
;;
|
|
35
|
+
esac
|
|
36
|
+
|
|
37
|
+
# Get daemon port
|
|
38
|
+
PORT=8765
|
|
39
|
+
PORT_FILE="$HOME/.superlocalmemory/daemon.port"
|
|
40
|
+
[ -f "$PORT_FILE" ] && PORT=$(cat "$PORT_FILE" 2>/dev/null || echo 8765)
|
|
41
|
+
|
|
42
|
+
# Log event to SLM daemon (fire and forget, 2s timeout)
|
|
43
|
+
curl -s -m 2 -X POST "http://127.0.0.1:${PORT}/api/v3/tool-event" \
|
|
44
|
+
-H "Content-Type: application/json" \
|
|
45
|
+
-d "{\"tool_name\": \"${TOOL_NAME}\", \"event_type\": \"complete\"}" \
|
|
46
|
+
>/dev/null 2>&1 || true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.7",
|
|
4
4
|
"description": "Information-geometric agent memory with mathematical guarantees. 4-channel retrieval, Fisher-Rao similarity, zero-LLM mode, EU AI Act compliant. Works with Claude, Cursor, Windsurf, and 17+ AI tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|
package/pyproject.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Self-enforcing inter-layer parameter constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Cryptographic signing for content attribution and tamper detection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Steganographic watermarking using zero-width Unicode characters.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — CLI package."""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""CLI command implementations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SLM Daemon — client functions for communicating with the unified daemon.
|
|
@@ -232,39 +232,69 @@ def _wait_for_daemon(timeout: int = 60) -> bool:
|
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
def stop_daemon() -> bool:
|
|
235
|
-
"""Stop
|
|
235
|
+
"""Stop ALL SLM daemon processes and their workers.
|
|
236
236
|
|
|
237
|
-
v3.4.
|
|
238
|
-
|
|
237
|
+
v3.4.7: Nuclear cleanup — finds and kills ALL processes matching
|
|
238
|
+
superlocalmemory.server.unified_daemon, embedding_worker, recall_worker,
|
|
239
|
+
reranker_worker. Not just the PID file daemon. Multiple daemons can
|
|
240
|
+
accumulate from rapid restarts, MCP warmups, and concurrent sessions.
|
|
239
241
|
"""
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
killed = 0
|
|
243
|
+
|
|
242
244
|
try:
|
|
243
|
-
|
|
245
|
+
import psutil
|
|
246
|
+
my_pid = os.getpid()
|
|
247
|
+
targets = [
|
|
248
|
+
"superlocalmemory.server.unified_daemon",
|
|
249
|
+
"superlocalmemory.core.embedding_worker",
|
|
250
|
+
"superlocalmemory.core.recall_worker",
|
|
251
|
+
"superlocalmemory.core.reranker_worker",
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
for proc in psutil.process_iter(["pid", "cmdline"]):
|
|
255
|
+
try:
|
|
256
|
+
if proc.pid == my_pid:
|
|
257
|
+
continue
|
|
258
|
+
cmdline = " ".join(proc.info.get("cmdline") or [])
|
|
259
|
+
if any(t in cmdline for t in targets):
|
|
260
|
+
# Kill children first, then process
|
|
261
|
+
for child in proc.children(recursive=True):
|
|
262
|
+
try:
|
|
263
|
+
child.kill()
|
|
264
|
+
killed += 1
|
|
265
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
266
|
+
pass
|
|
267
|
+
proc.kill()
|
|
268
|
+
killed += 1
|
|
269
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
270
|
+
pass
|
|
244
271
|
|
|
245
|
-
|
|
272
|
+
except ImportError:
|
|
273
|
+
# Fallback: pkill by pattern
|
|
246
274
|
try:
|
|
247
|
-
import
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
275
|
+
import subprocess as _sp
|
|
276
|
+
for pattern in [
|
|
277
|
+
"superlocalmemory.server.unified_daemon",
|
|
278
|
+
"superlocalmemory.core.embedding_worker",
|
|
279
|
+
"superlocalmemory.core.recall_worker",
|
|
280
|
+
"superlocalmemory.core.reranker_worker",
|
|
281
|
+
]:
|
|
282
|
+
result = _sp.run(
|
|
283
|
+
["pkill", "-9", "-f", pattern],
|
|
284
|
+
capture_output=True, timeout=5,
|
|
285
|
+
)
|
|
286
|
+
if result.returncode == 0:
|
|
287
|
+
killed += 1
|
|
260
288
|
except Exception:
|
|
261
289
|
pass
|
|
262
290
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
291
|
+
# Clean up PID/port files
|
|
292
|
+
_PID_FILE.unlink(missing_ok=True)
|
|
293
|
+
_PORT_FILE.unlink(missing_ok=True)
|
|
294
|
+
|
|
295
|
+
if killed:
|
|
296
|
+
logger.info("Stopped %d SLM processes", killed)
|
|
297
|
+
return True
|
|
268
298
|
|
|
269
299
|
|
|
270
300
|
# ---------------------------------------------------------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Shared JSON envelope for agent-native CLI output.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — CLI entry point.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Migration CLI command implementation."""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Pending memory store — zero-loss async remember (Option C).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Post-install script for npm package.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""OS-level service installer — daemon survives reboots.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Interactive setup wizard for first-time configuration.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Code Knowledge Graph for SuperLocalMemory.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""BlastRadius — bidirectional BFS impact analysis.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Bridge between code_graph.db and SLM memory.db.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Entity Resolver — match SLM fact text against code graph nodes.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Event Listeners — bidirectional bridge between SLM events and code graph.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Fact Enricher — append code metadata to fact descriptions.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Hebbian Linker — code-aware association edge creation.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Bridge Module
|
|
4
4
|
|
|
5
5
|
"""Temporal Checker — invalidate memories about deleted/renamed code.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""ChangeAnalyzer — git diff to risk-scored change analysis.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""CommunityDetector — file-based community detection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Configuration for the CodeGraph module.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Base extractor ABC for language-specific AST extraction.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Python-specific AST extractor using tree-sitter S-expression queries.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""TypeScript/JavaScript AST extractor using tree-sitter.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""FlowDetector — entry point detection and execution flow tracing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Git post-commit hook for automatic code graph updates.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""GraphEngine — rustworkx in-memory directed graph.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""GraphStore — thin graph-specific layer over CodeGraphDatabase.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""IncrementalUpdater — hash-based change detection + dependent tracing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Multi-language tree-sitter parser with parallel execution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""Cross-file import resolution with heuristic fallback.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""HybridSearch — FTS5 + vec0 + Reciprocal Rank Fusion.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""CodeGraphService — the main orchestrator.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory v3.4 — CodeGraph Module
|
|
4
4
|
|
|
5
5
|
"""CodeGraphWatcher — file system watcher with debounce.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Attribute-Based Access Control for memory operations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Tamper-proof hash-chain audit log for compliance.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — EU AI Act Compliance Verification.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — GDPR Compliance.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — Memory Lifecycle Management.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Named retention rules engine for compliance (GDPR, HIPAA, custom).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""Background scheduler that periodically enforces retention rules.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
|
-
# Licensed under
|
|
2
|
+
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
3
|
# Part of SuperLocalMemory V3 | https://qualixar.com | https://varunpratap.com
|
|
4
4
|
|
|
5
5
|
"""SuperLocalMemory V3 — Configuration.
|