superlocalmemory 3.4.21 → 3.4.23
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 +30 -1
- package/package.json +1 -1
- package/pyproject.toml +2 -2
- package/scripts/build_entry.py +1 -1
- package/scripts/release_manifest.py +2 -2
- package/skills/slm-build-graph/SKILL.md +1 -1
- package/skills/slm-list-recent/SKILL.md +1 -1
- package/skills/slm-recall/SKILL.md +3 -3
- package/skills/slm-remember/SKILL.md +1 -1
- package/skills/slm-status/SKILL.md +1 -1
- package/skills/slm-switch-profile/SKILL.md +1 -1
- package/src/superlocalmemory/__init__.py +3 -0
- package/src/superlocalmemory/cli/commands.py +40 -5
- package/src/superlocalmemory/cli/context_commands.py +1 -1
- package/src/superlocalmemory/cli/db_migrate.py +1 -1
- package/src/superlocalmemory/cli/escape_hatch.py +1 -1
- package/src/superlocalmemory/cli/main.py +3 -3
- package/src/superlocalmemory/core/context_cache.py +2 -2
- package/src/superlocalmemory/core/ram_lock.py +1 -1
- package/src/superlocalmemory/core/recall_pipeline.py +5 -5
- package/src/superlocalmemory/core/security_primitives.py +2 -2
- package/src/superlocalmemory/core/shadow_router.py +2 -2
- package/src/superlocalmemory/core/slm_disabled.py +1 -1
- package/src/superlocalmemory/core/slmignore.py +1 -1
- package/src/superlocalmemory/core/topic_signature.py +3 -3
- package/src/superlocalmemory/evolution/budget.py +1 -1
- package/src/superlocalmemory/evolution/llm_dispatch.py +2 -2
- package/src/superlocalmemory/hooks/_outcome_common.py +1 -1
- package/src/superlocalmemory/hooks/adapter_base.py +1 -1
- package/src/superlocalmemory/hooks/antigravity_adapter.py +1 -1
- package/src/superlocalmemory/hooks/context_payload.py +2 -2
- package/src/superlocalmemory/hooks/copilot_adapter.py +1 -1
- package/src/superlocalmemory/hooks/cross_platform_connector.py +1 -1
- package/src/superlocalmemory/hooks/cursor_adapter.py +1 -1
- package/src/superlocalmemory/hooks/hook_handlers.py +1 -1
- package/src/superlocalmemory/hooks/ide_connector.py +2 -2
- package/src/superlocalmemory/hooks/post_tool_async_hook.py +1 -1
- package/src/superlocalmemory/hooks/post_tool_outcome_hook.py +1 -1
- package/src/superlocalmemory/hooks/prewarm_auth.py +1 -1
- package/src/superlocalmemory/hooks/session_registry.py +1 -1
- package/src/superlocalmemory/hooks/stop_outcome_hook.py +1 -1
- package/src/superlocalmemory/hooks/sync_loop.py +2 -2
- package/src/superlocalmemory/hooks/user_prompt_hook.py +1 -1
- package/src/superlocalmemory/hooks/user_prompt_rehash_hook.py +1 -1
- package/src/superlocalmemory/learning/arm_catalog.py +1 -1
- package/src/superlocalmemory/learning/bandit.py +1 -1
- package/src/superlocalmemory/learning/bandit_cache.py +1 -1
- package/src/superlocalmemory/learning/consolidation_cycle.py +4 -4
- package/src/superlocalmemory/learning/consolidation_worker.py +1 -1
- package/src/superlocalmemory/learning/database.py +5 -5
- package/src/superlocalmemory/learning/dedup_hnsw.py +1 -1
- package/src/superlocalmemory/learning/ensemble.py +2 -2
- package/src/superlocalmemory/learning/fact_outcome_joins.py +1 -1
- package/src/superlocalmemory/learning/forgetting_scheduler.py +2 -2
- package/src/superlocalmemory/learning/hnsw_dedup.py +2 -2
- package/src/superlocalmemory/learning/labeler.py +3 -3
- package/src/superlocalmemory/learning/legacy_migration.py +1 -1
- package/src/superlocalmemory/learning/memory_merge.py +1 -1
- package/src/superlocalmemory/learning/model_cache.py +1 -1
- package/src/superlocalmemory/learning/model_rollback.py +2 -2
- package/src/superlocalmemory/learning/outcome_queue.py +2 -2
- package/src/superlocalmemory/learning/pattern_miner.py +1 -1
- package/src/superlocalmemory/learning/pattern_miner_constants.py +1 -1
- package/src/superlocalmemory/learning/ranker.py +3 -3
- package/src/superlocalmemory/learning/ranker_common.py +1 -1
- package/src/superlocalmemory/learning/ranker_retrain_legacy.py +3 -3
- package/src/superlocalmemory/learning/ranker_retrain_online.py +4 -4
- package/src/superlocalmemory/learning/reward.py +1 -1
- package/src/superlocalmemory/learning/reward_archive.py +2 -2
- package/src/superlocalmemory/learning/reward_boost.py +2 -2
- package/src/superlocalmemory/learning/reward_proxy.py +4 -4
- package/src/superlocalmemory/learning/shadow_test.py +1 -1
- package/src/superlocalmemory/learning/signal_worker.py +2 -2
- package/src/superlocalmemory/learning/signals.py +2 -2
- package/src/superlocalmemory/learning/trigram_index.py +1 -1
- package/src/superlocalmemory/mcp/tools_context.py +1 -1
- package/src/superlocalmemory/mcp/tools_core.py +2 -2
- package/src/superlocalmemory/parameterization/soft_prompt_generator.py +3 -3
- package/src/superlocalmemory/server/bandit_loops.py +2 -2
- package/src/superlocalmemory/server/middleware/__init__.py +2 -2
- package/src/superlocalmemory/server/middleware/security_headers.py +3 -3
- package/src/superlocalmemory/server/routes/brain.py +10 -10
- package/src/superlocalmemory/server/routes/prewarm.py +1 -1
- package/src/superlocalmemory/server/security_middleware.py +21 -3
- package/src/superlocalmemory/server/unified_daemon.py +111 -9
- package/src/superlocalmemory/skills/slm-build-graph/SKILL.md +423 -0
- package/src/superlocalmemory/skills/slm-list-recent/SKILL.md +348 -0
- package/src/superlocalmemory/skills/slm-recall/SKILL.md +343 -0
- package/src/superlocalmemory/skills/slm-remember/SKILL.md +194 -0
- package/src/superlocalmemory/skills/slm-show-patterns/SKILL.md +224 -0
- package/src/superlocalmemory/skills/slm-status/SKILL.md +363 -0
- package/src/superlocalmemory/skills/slm-switch-profile/SKILL.md +442 -0
- package/src/superlocalmemory/storage/migration_runner.py +4 -4
- package/src/superlocalmemory/storage/migrations/M001_add_signal_features_columns.py +1 -1
- package/src/superlocalmemory/storage/migrations/M002_model_state_history.py +2 -2
- package/src/superlocalmemory/storage/migrations/M003_migration_log.py +1 -1
- package/src/superlocalmemory/storage/migrations/M004_cross_platform_sync_log.py +1 -1
- package/src/superlocalmemory/storage/migrations/M005_bandit_tables.py +1 -1
- package/src/superlocalmemory/storage/migrations/M006_action_outcomes_reward.py +1 -1
- package/src/superlocalmemory/storage/migrations/M007_pending_outcomes.py +1 -1
- package/src/superlocalmemory/storage/migrations/M009_model_lineage.py +1 -1
- package/src/superlocalmemory/storage/migrations/M010_evolution_config.py +2 -2
- package/src/superlocalmemory/storage/migrations/M011_archive_and_merge.py +1 -1
- package/src/superlocalmemory/storage/migrations/M012_shadow_observations.py +1 -1
- package/src/superlocalmemory/storage/migrations/M013_bi_temporal_columns.py +2 -2
- package/src/superlocalmemory/storage/migrations/__init__.py +3 -3
- package/src/superlocalmemory/ui/index.html +4 -0
- package/src/superlocalmemory/ui/js/core.js +96 -1
- package/src/superlocalmemory.egg-info/PKG-INFO +655 -0
- package/src/superlocalmemory.egg-info/SOURCES.txt +426 -0
- package/src/superlocalmemory.egg-info/dependency_links.txt +1 -0
- package/src/superlocalmemory.egg-info/entry_points.txt +2 -0
- package/src/superlocalmemory.egg-info/requires.txt +58 -0
- package/src/superlocalmemory.egg-info/top_level.txt +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## [3.4.
|
|
13
|
+
## [3.4.23] - 2026-04-21
|
|
14
|
+
|
|
15
|
+
Critical hotfix on top of 3.4.22 for two end-user-facing regressions.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Daemon error log no longer balloons.** A ternary passed as the
|
|
19
|
+
`logger.info` format string caused a `TypeError` on every startup in 24/7
|
|
20
|
+
mode. Python's logging module then dumped the full FastAPI
|
|
21
|
+
`merged_lifespan` stack to stderr; over a day the LaunchAgent log grew to
|
|
22
|
+
tens of MB. The call is now pre-formatted. A defensive log-rotation pass
|
|
23
|
+
at startup truncates any daemon log over 10 MB so users upgrading from
|
|
24
|
+
3.4.22 get a clean slate on first boot.
|
|
25
|
+
- **Dashboard no longer hangs after a daemon upgrade.** Static JS/CSS/HTML
|
|
26
|
+
was served without cache headers, so browsers served stale modules after
|
|
27
|
+
`slm restart` and the dashboard showed an infinite spinner. All static
|
|
28
|
+
responses now ship `Cache-Control: no-cache, must-revalidate`, and
|
|
29
|
+
`index.html` embeds the server version; on mismatch the tab clears
|
|
30
|
+
`localStorage` (preserving theme) and hard-reloads once.
|
|
31
|
+
- **Fetches can no longer hang forever.** A global `fetch` patch attaches a
|
|
32
|
+
15-second `AbortController` timeout to every relative-URL request, so a
|
|
33
|
+
dead socket surfaces as a rejection instead of leaving a spinner
|
|
34
|
+
spinning. No callsite changes required.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- `GET /api/version` — returns the running daemon version; consumed by the
|
|
38
|
+
dashboard version-fingerprint auto-reload.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## [3.4.22] - 2026-04-18
|
|
14
43
|
|
|
15
44
|
Hardening release — correctness, stability, and security fixes.
|
|
16
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.23",
|
|
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,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "superlocalmemory"
|
|
3
|
-
version = "3.4.
|
|
3
|
+
version = "3.4.23"
|
|
4
4
|
description = "Information-geometric agent memory with mathematical guarantees"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {text = "AGPL-3.0-or-later"}
|
|
@@ -116,7 +116,7 @@ build-backend = "setuptools.build_meta"
|
|
|
116
116
|
where = ["src"]
|
|
117
117
|
|
|
118
118
|
[tool.setuptools.package-data]
|
|
119
|
-
superlocalmemory = ["ui/**/*"]
|
|
119
|
+
superlocalmemory = ["ui/**/*", "skills/**/*"]
|
|
120
120
|
|
|
121
121
|
[tool.pytest.ini_options]
|
|
122
122
|
testpaths = ["tests"]
|
package/scripts/build_entry.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-06 §6.1
|
|
4
4
|
|
|
5
5
|
"""Generate the release ``manifest.json`` for ``slm-hook`` binaries.
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Section 6.1 (Release manifest).
|
|
|
10
10
|
Shape (per LLD-06 §6.1):
|
|
11
11
|
|
|
12
12
|
{
|
|
13
|
-
"version": "3.4.
|
|
13
|
+
"version": "3.4.22",
|
|
14
14
|
"released_at": "2026-04-17T00:00:00Z",
|
|
15
15
|
"assets": [
|
|
16
16
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-build-graph
|
|
3
3
|
description: Build or rebuild the knowledge graph from existing memories using TF-IDF entity extraction and Leiden clustering. Use when search results seem poor, after bulk imports, or to optimize performance. Automatically discovers relationships between memories and creates topic clusters.
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
6
|
compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/, optional dependencies: python-igraph, leidenalg"
|
|
7
7
|
attribution:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-list-recent
|
|
3
3
|
description: List most recent memories in chronological order. Use when the user wants to see what was recently saved, review recent conversations, check what they worked on today, or browse memory history. Shows memories sorted by creation time (newest first).
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
6
|
compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/"
|
|
7
7
|
attribution:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-recall
|
|
3
3
|
description: Search SuperLocalMemory for relevant facts, decisions, and past context. Use when the user asks to recall, search, find, or retrieve stored information. Invokes 5-channel retrieval with LightGBM reranking via MCP.
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
|
-
compatibility: "SuperLocalMemory v3.4.
|
|
6
|
+
compatibility: "SuperLocalMemory v3.4.22 — MCP (preferred) or CLI fallback"
|
|
7
7
|
attribution:
|
|
8
8
|
creator: Varun Pratap Bhardwaj
|
|
9
9
|
role: Solution Architect & Creator
|
|
@@ -325,7 +325,7 @@ slm recall "query" --format csv
|
|
|
325
325
|
|
|
326
326
|
*Open source doesn't mean removing credit. Attribution must be preserved per MIT License terms.*
|
|
327
327
|
|
|
328
|
-
## V3 Update (v3.4.
|
|
328
|
+
## V3 Update (v3.4.22)
|
|
329
329
|
|
|
330
330
|
**Preferred**: Use the `recall` MCP tool directly — it uses 5-channel retrieval
|
|
331
331
|
(semantic, BM25, entity-graph, temporal, Hopfield) with LightGBM reranking
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-remember
|
|
3
3
|
description: Save content to SuperLocalMemory with intelligent indexing and knowledge graph integration. Use when the user wants to remember information, save context, store coding decisions, or persist knowledge for future sessions. Automatically indexes, graphs, and learns patterns.
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
6
|
compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/"
|
|
7
7
|
attribution:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-status
|
|
3
3
|
description: Check SuperLocalMemory system status, health, and statistics. Use when the user wants to know memory count, graph stats, patterns learned, database health, or system diagnostics. Shows comprehensive system health dashboard.
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
6
|
compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/"
|
|
7
7
|
attribution:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-switch-profile
|
|
3
3
|
description: Switch between memory profiles for context isolation and management. Use when the user wants to change profile context, separate work/personal memories, or manage multiple independent memory spaces. Each profile has its own database, graph, and patterns.
|
|
4
|
-
version: "3.4.
|
|
4
|
+
version: "3.4.23"
|
|
5
5
|
license: AGPL-3.0-or-later
|
|
6
6
|
compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/"
|
|
7
7
|
attribution:
|
|
@@ -112,11 +112,11 @@ def dispatch(args: Namespace) -> None:
|
|
|
112
112
|
# V3.4.11 skill evolution
|
|
113
113
|
"config": cmd_config,
|
|
114
114
|
"evolve": cmd_evolve,
|
|
115
|
-
# V3.4.
|
|
115
|
+
# V3.4.22 LLD-05 context pre-staging
|
|
116
116
|
"context": _cmd_context_dispatch,
|
|
117
|
-
# V3.4.
|
|
117
|
+
# V3.4.22 LLD-06 additive schema migrations
|
|
118
118
|
"db": _cmd_db_dispatch,
|
|
119
|
-
# V3.4.
|
|
119
|
+
# V3.4.22 Stage 8 SB-5 — MASTER-PLAN §8 escape hatches.
|
|
120
120
|
"disable": _cmd_escape_disable,
|
|
121
121
|
"enable": _cmd_escape_enable,
|
|
122
122
|
"clear-cache": _cmd_escape_clear_cache,
|
|
@@ -690,13 +690,13 @@ def cmd_provider(args: Namespace) -> None:
|
|
|
690
690
|
|
|
691
691
|
|
|
692
692
|
def _cmd_context_dispatch(args: Namespace) -> None:
|
|
693
|
-
"""V3.4.
|
|
693
|
+
"""V3.4.22 LLD-05: ``slm context prestage``."""
|
|
694
694
|
from superlocalmemory.cli.context_commands import cmd_context
|
|
695
695
|
cmd_context(args)
|
|
696
696
|
|
|
697
697
|
|
|
698
698
|
def cmd_connect(args: Namespace) -> None:
|
|
699
|
-
"""Configure IDE integrations. V3.4.
|
|
699
|
+
"""Configure IDE integrations. V3.4.22: ``--cross-platform`` uses LLD-05."""
|
|
700
700
|
# Route --disable <name> and --cross-platform to the LLD-05 orchestrator.
|
|
701
701
|
if getattr(args, "disable", None) or getattr(args, "cross_platform", False):
|
|
702
702
|
from superlocalmemory.cli.context_commands import (
|
|
@@ -1939,6 +1939,41 @@ def cmd_hooks(args: Namespace) -> None:
|
|
|
1939
1939
|
if include_gate:
|
|
1940
1940
|
print(" Gate: ON (enforces session_init — experimental)")
|
|
1941
1941
|
print(" SLM: Hooks installed into Claude Code (slm hooks remove to undo)")
|
|
1942
|
+
# S9-DASH-11: also install skills so /slm-recall, /slm-remember
|
|
1943
|
+
# etc. are available immediately in Claude Code regardless of
|
|
1944
|
+
# whether the user installed via npm or pip.
|
|
1945
|
+
try:
|
|
1946
|
+
import importlib.resources as _ir
|
|
1947
|
+
import importlib.util as _iu
|
|
1948
|
+
import shutil as _sh
|
|
1949
|
+
from pathlib import Path as _P
|
|
1950
|
+
|
|
1951
|
+
claude_skills_dir = _P.home() / ".claude" / "skills"
|
|
1952
|
+
claude_skills_dir.mkdir(parents=True, exist_ok=True)
|
|
1953
|
+
|
|
1954
|
+
# Try Python-package bundled skills first (works for both
|
|
1955
|
+
# pip and npm users who have the Python pkg installed).
|
|
1956
|
+
pkg_skills: _P | None = None
|
|
1957
|
+
spec = _iu.find_spec("superlocalmemory")
|
|
1958
|
+
if spec and spec.submodule_search_locations:
|
|
1959
|
+
candidate = _P(list(spec.submodule_search_locations)[0]) / "skills"
|
|
1960
|
+
if candidate.is_dir():
|
|
1961
|
+
pkg_skills = candidate
|
|
1962
|
+
|
|
1963
|
+
if pkg_skills:
|
|
1964
|
+
installed_skills = 0
|
|
1965
|
+
for d in pkg_skills.iterdir():
|
|
1966
|
+
if d.is_dir():
|
|
1967
|
+
src_skill = d / "SKILL.md"
|
|
1968
|
+
if src_skill.exists():
|
|
1969
|
+
dst = claude_skills_dir / (d.name + ".md")
|
|
1970
|
+
_sh.copy2(str(src_skill), str(dst))
|
|
1971
|
+
installed_skills += 1
|
|
1972
|
+
if installed_skills:
|
|
1973
|
+
print(f" Skills: {installed_skills} skills installed → {claude_skills_dir}")
|
|
1974
|
+
print(" Use /slm-recall, /slm-remember, /slm-status in Claude Code")
|
|
1975
|
+
except Exception as _skill_exc:
|
|
1976
|
+
pass # non-fatal — skills can be installed via install-skills.sh
|
|
1942
1977
|
else:
|
|
1943
1978
|
print(f"Installation failed: {result['errors']}")
|
|
1944
1979
|
elif action == "remove":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §8
|
|
4
4
|
|
|
5
5
|
"""CLI — ``slm context prestage`` and ``slm connect --disable`` (LLD-05).
|
|
6
6
|
|
|
@@ -130,7 +130,7 @@ def main() -> None:
|
|
|
130
130
|
)
|
|
131
131
|
|
|
132
132
|
# LLD-06 §7.2 — `slm db migrate` wraps LLD-07's additive schema migrations.
|
|
133
|
-
db_p = sub.add_parser("db", help="Database maintenance commands (v3.4.
|
|
133
|
+
db_p = sub.add_parser("db", help="Database maintenance commands (v3.4.22)")
|
|
134
134
|
db_sub = db_p.add_subparsers(dest="db_command", title="db subcommands")
|
|
135
135
|
db_mig_p = db_sub.add_parser(
|
|
136
136
|
"migrate",
|
|
@@ -357,7 +357,7 @@ def main() -> None:
|
|
|
357
357
|
evolve_p.add_argument("--session", default="", help="Session ID to process")
|
|
358
358
|
evolve_p.add_argument("--profile", default="default", help="Profile ID")
|
|
359
359
|
|
|
360
|
-
# v3.4.
|
|
360
|
+
# v3.4.22 — MASTER-PLAN §8 escape hatches (Stage 8 SB-5).
|
|
361
361
|
disable_p = sub.add_parser(
|
|
362
362
|
"disable",
|
|
363
363
|
help="Disable SLM globally (writes ~/.superlocalmemory/.disabled, stops daemon)",
|
|
@@ -417,7 +417,7 @@ def main() -> None:
|
|
|
417
417
|
_NO_DAEMON_COMMANDS = {
|
|
418
418
|
"setup", "mode", "provider", "connect", "migrate", "mcp", "warmup",
|
|
419
419
|
"config", "evolve", "db",
|
|
420
|
-
# v3.4.
|
|
420
|
+
# v3.4.22 escape hatches — never auto-start the daemon on these.
|
|
421
421
|
"disable", "enable", "clear-cache", "reconfigure", "benchmark",
|
|
422
422
|
"rotate-token",
|
|
423
423
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-01 §4.1
|
|
4
4
|
|
|
5
5
|
"""Context cache — separate SQLite WAL DB, read-path <10 ms.
|
|
6
6
|
|
|
@@ -47,7 +47,7 @@ TTL_SECONDS: int = 120
|
|
|
47
47
|
CLEANUP_HORIZON_SECONDS: int = 600
|
|
48
48
|
MAX_BYTES: int = 50 * 1024 * 1024
|
|
49
49
|
MAX_CONTENT_CHARS: int = 4000
|
|
50
|
-
SCHEMA_VERSION: str = "3.4.
|
|
50
|
+
SCHEMA_VERSION: str = "3.4.23"
|
|
51
51
|
|
|
52
52
|
_HMAC_MATERIAL: bytes = b"active_brain_cache"
|
|
53
53
|
_HMAC_HEX_LEN: int = 32
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-00 §7 + P0.5
|
|
4
4
|
|
|
5
5
|
"""Process-wide RAM semaphore for heavyweight consolidation subsystems.
|
|
6
6
|
|
|
@@ -176,7 +176,7 @@ def _get_forgetting_scheduler(db: Any, config: Any) -> Any:
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
# ---------------------------------------------------------------------------
|
|
179
|
-
# S8-ARC-04 (v3.4.
|
|
179
|
+
# S8-ARC-04 (v3.4.22): unified ranking entry point.
|
|
180
180
|
# ---------------------------------------------------------------------------
|
|
181
181
|
|
|
182
182
|
_RANKING_MODES: frozenset[str] = frozenset({"off", "v1", "v2", "v2-ensemble"})
|
|
@@ -215,8 +215,8 @@ def apply_ranking(
|
|
|
215
215
|
Modes:
|
|
216
216
|
- ``off``: identity — no ranking passes run at all.
|
|
217
217
|
- ``v1``: v3.1 Active-Memory adaptive rerank only.
|
|
218
|
-
- ``v2``: v1 + v3.4.
|
|
219
|
-
- ``v2-ensemble`` (default): v2 + v3.4.
|
|
218
|
+
- ``v2``: v1 + v3.4.22 lambdarank rerank + signal enqueue.
|
|
219
|
+
- ``v2-ensemble`` (default): v2 + v3.4.22 contextual-bandit ensemble.
|
|
220
220
|
|
|
221
221
|
Each underlying pass is already defensive (catches its own exceptions),
|
|
222
222
|
so this wrapper adds an outer try/except to guarantee the caller
|
|
@@ -317,7 +317,7 @@ def apply_adaptive_ranking(
|
|
|
317
317
|
# apply_v2_adaptive_ranking (LLD-02 §4.3)
|
|
318
318
|
# ---------------------------------------------------------------------------
|
|
319
319
|
#
|
|
320
|
-
# Opt-in v3.4.
|
|
320
|
+
# Opt-in v3.4.22 path: load active model from learning.db with SHA-256
|
|
321
321
|
# verification, re-rank via native Booster, enqueue signals async. The
|
|
322
322
|
# existing ``apply_adaptive_ranking`` above stays for 3.4.20 callers.
|
|
323
323
|
# ---------------------------------------------------------------------------
|
|
@@ -694,7 +694,7 @@ def run_recall(
|
|
|
694
694
|
except Exception as exc:
|
|
695
695
|
logger.debug("Hebbian strengthening: %s", exc)
|
|
696
696
|
|
|
697
|
-
# S8-ARC-04 (v3.4.
|
|
697
|
+
# S8-ARC-04 (v3.4.22): unified ranking entry point. Single env-var
|
|
698
698
|
# (SLM_RANKING=off|v1|v2|v2-ensemble) controls the pipeline. Legacy
|
|
699
699
|
# SLM_V2_PIPELINE_DISABLED + SLM_BANDIT_DISABLED still honoured for
|
|
700
700
|
# one-release back-compat. Identity when no active model.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-07 §6
|
|
4
4
|
|
|
5
|
-
"""Shared security primitives for SLM v3.4.
|
|
5
|
+
"""Shared security primitives for SLM v3.4.22.
|
|
6
6
|
|
|
7
7
|
LLD reference: `.backup/active-brain/lld/LLD-07-schema-migrations-and-security-primitives.md`
|
|
8
8
|
Section: 6.1 through 6.10.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — Stage 8 SB-1 / Track A.3 (LLD-10)
|
|
4
4
|
|
|
5
5
|
"""Daemon-resident recall-time A/B router for LLD-10 shadow + rollback.
|
|
6
6
|
|
|
7
7
|
This module is the single seam that wires ``ShadowTest`` (pre-promotion)
|
|
8
8
|
and ``ModelRollback`` (post-promotion) into the live recall path. Before
|
|
9
|
-
this module existed (pre-v3.4.
|
|
9
|
+
this module existed (pre-v3.4.22 Stage 8 SB-1) both classes were
|
|
10
10
|
defined + unit-tested but had zero production callers in ``src/``.
|
|
11
11
|
|
|
12
12
|
Design constraints:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-01 §4.2
|
|
4
4
|
|
|
5
5
|
"""Topic signature — deterministic, Unicode-safe, ReDoS-resistant 16-char hex.
|
|
6
6
|
|
|
@@ -91,7 +91,7 @@ def compute_topic_signature(
|
|
|
91
91
|
|
|
92
92
|
``entity_hits`` (LLD-13 Track C.1) — optional list of entity IDs
|
|
93
93
|
produced by the inline trigram lookup. Backward-compatible default:
|
|
94
|
-
when omitted or empty, the output is BYTE-IDENTICAL to the v3.4.
|
|
94
|
+
when omitted or empty, the output is BYTE-IDENTICAL to the v3.4.22
|
|
95
95
|
pre-Living-Brain signature. When non-empty, the sorted-deduped IDs
|
|
96
96
|
are mixed into the canonical material as a seventh group so that
|
|
97
97
|
cache probes differentiate semantically-distinct prompts that
|
|
@@ -133,7 +133,7 @@ def compute_topic_signature(
|
|
|
133
133
|
_canon(bigrams),
|
|
134
134
|
]
|
|
135
135
|
# LLD-13: append entity-hits group ONLY when non-empty. Empty/missing
|
|
136
|
-
# preserves the byte-identical v3.4.
|
|
136
|
+
# preserves the byte-identical v3.4.22 pre-Living-Brain signature.
|
|
137
137
|
if entity_hits:
|
|
138
138
|
groups.append(_canon([str(e) for e in entity_hits]))
|
|
139
139
|
material = "\0\0".join(groups)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-11 §Dispatch
|
|
4
4
|
|
|
5
5
|
"""Central LLM dispatch for the skill-evolution subsystem.
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ audit row to ``evolution_llm_cost_log`` after the dispatch succeeds — the
|
|
|
13
13
|
row stores only the *redacted* prompt length and the model, never the
|
|
14
14
|
raw prompt, so no canary can leak via the cost log.
|
|
15
15
|
|
|
16
|
-
SB-2/SB-3/SB-4 fix cluster (v3.4.
|
|
16
|
+
SB-2/SB-3/SB-4 fix cluster (v3.4.22 Stage 8):
|
|
17
17
|
* All backend entry points (claude CLI, ollama, Anthropic/OpenAI API)
|
|
18
18
|
live HERE, not in ``skill_evolver``. ``SkillEvolver._llm_call``
|
|
19
19
|
delegates to ``_dispatch_llm`` so the validate → redact → log
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — Track A.2 (LLD-09)
|
|
4
4
|
|
|
5
5
|
"""Shared helpers for the three outcome-population hooks (LLD-09).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §2, §4.4, §9.3
|
|
4
4
|
|
|
5
5
|
"""Cross-platform adapter base — shared Protocol and atomic write primitive.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §5
|
|
4
4
|
|
|
5
5
|
"""Antigravity adapter — writes SKILL.md under singular ``.agent/skills/``.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §3
|
|
4
4
|
|
|
5
5
|
"""Shared content builder — single source for every adapter body.
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ from typing import Callable, Iterable
|
|
|
22
22
|
from superlocalmemory.core.security_primitives import redact_secrets
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
VERSION = "3.4.
|
|
25
|
+
VERSION = "3.4.23"
|
|
26
26
|
DEFAULT_TOP_K = 10
|
|
27
27
|
DEFAULT_DECISIONS_K = 5
|
|
28
28
|
DEFAULT_MEMORIES_K = 10
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §6
|
|
4
4
|
|
|
5
5
|
"""Copilot adapter — writes ``.github/copilot-instructions.md``.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §8.2
|
|
4
4
|
|
|
5
5
|
"""Cross-platform adapter orchestrator (``slm connect``).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §4
|
|
4
4
|
|
|
5
5
|
"""Cursor adapter — writes ``.cursor/rules/*.mdc`` per-project AND global.
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ def _daemon_post(path: str, body: dict, timeout: float = 3.0) -> bool:
|
|
|
62
62
|
|
|
63
63
|
def handle_hook(action: str) -> None:
|
|
64
64
|
"""Dispatch to the appropriate hook handler. Called from main() fast path."""
|
|
65
|
-
# v3.4.
|
|
65
|
+
# v3.4.22 (LLD-01 §4.7): Active-Brain hot-path handlers are routed here
|
|
66
66
|
# as a Python fallback when the compiled ``slm-hook`` binary (LLD-06) is
|
|
67
67
|
# unavailable. They read stdin, write stdout, and exit 0 themselves.
|
|
68
68
|
if action == "user_prompt_submit":
|
|
@@ -84,7 +84,7 @@ MARKDOWN_TEMPLATE = """
|
|
|
84
84
|
class IDEConnector: # pragma: no cover — legacy shim, covered by test_ide_connector.py
|
|
85
85
|
"""Detect installed IDEs and generate SLM integration configs.
|
|
86
86
|
|
|
87
|
-
NOTE (v3.4.
|
|
87
|
+
NOTE (v3.4.22): this is the pre-LLD-05 connector kept for backward
|
|
88
88
|
compatibility. New code should use
|
|
89
89
|
``superlocalmemory.hooks.cross_platform_connector.CrossPlatformConnector``.
|
|
90
90
|
This class has its own dedicated test file (``tests/test_ide_connector.py``)
|
|
@@ -214,7 +214,7 @@ class IDEConnector: # pragma: no cover — legacy shim, covered by test_ide_con
|
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
# ---------------------------------------------------------------------------
|
|
217
|
-
# LLD-05 Cross-Platform Adapter Orchestrator (v3.4.
|
|
217
|
+
# LLD-05 Cross-Platform Adapter Orchestrator (v3.4.22) — re-export
|
|
218
218
|
# ---------------------------------------------------------------------------
|
|
219
219
|
# The orchestrator now lives in ``hooks.cross_platform_connector`` so it can
|
|
220
220
|
# be unit-tested in isolation from the legacy ``IDEConnector`` shim above.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-01 §4.4
|
|
4
4
|
|
|
5
5
|
"""PostToolUse async:true hook — fire-and-forget prewarm via stdlib urllib.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — Track A.2 (LLD-09 / LLD-00)
|
|
4
4
|
|
|
5
5
|
"""PostToolUse hook — detect fact usage + write engagement signal.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-01 §4.5
|
|
4
4
|
|
|
5
5
|
"""Authentication primitives for the /internal/prewarm daemon route.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — S9-DASH-10
|
|
4
4
|
|
|
5
5
|
"""Lightweight session registry for cross-process session_id handoff.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — Track A.2 (LLD-09 / LLD-00)
|
|
4
4
|
|
|
5
5
|
"""Stop hook — finalize every pending outcome for this session.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
|
|
2
2
|
# Licensed under AGPL-3.0-or-later - see LICENSE file
|
|
3
|
-
# Part of SuperLocalMemory v3.4.
|
|
3
|
+
# Part of SuperLocalMemory v3.4.22 — LLD-05 §9
|
|
4
4
|
|
|
5
5
|
"""Background sync loop — keeps every cross-platform adapter fresh.
|
|
6
6
|
|
|
@@ -68,7 +68,7 @@ async def cross_platform_sync_loop(
|
|
|
68
68
|
async def run_once(adapters: Iterable[Adapter]) -> dict[str, str]:
|
|
69
69
|
"""Run a single sync cycle over all adapters. Never raises.
|
|
70
70
|
|
|
71
|
-
E.3 (v3.4.
|
|
71
|
+
E.3 (v3.4.22 perf): ``adapter.sync()`` is synchronous file I/O
|
|
72
72
|
(opens/reads/writes JSON files in ~/.cursor, ~/.antigravity, etc.)
|
|
73
73
|
and used to run directly on the event loop — a slow disk or a
|
|
74
74
|
large workspace could block the daemon for tens of milliseconds,
|