Breaking
- License changed from MIT to Apache-2.0. All code from this release onwards is Apache-2.0. Previous releases remain MIT-licensed. See
LICENSE-MITfor the original license andNOTICEfor attribution.
Added
- Context Engine + HTTP server mode:
lean-ctx serveexposes all 46 MCP tools via REST endpoints with rate limiting, timeouts, and graceful shutdown — enables embedding lean-ctx as a library. - Memory Runtime (autopilot): Adaptive forgetting, salience tagging, consolidation engine, prospective memory triggers, and dual-process retrieval router — all token-budgeted and zero-config.
- Reciprocal Rank Fusion (RRF) cache eviction: Replaces the Boltzmann-weighted eviction scoring. RRF handles signal incomparability (recency vs frequency vs size) without tuned weights (K=60).
- Claude Code 2048-char truncation fix: Auto-detects Claude Code and delivers ultra-compact instructions (<2048 chars). Full instructions installed as
~/.claude/rules/lean-ctx.md. - Claude Agent Skills auto-install:
lean-ctx init --agent claudeinstallsSKILL.md+scripts/install.shunder~/.claude/skills/lean-ctx/. - ARM64 Linux support:
aarch64-unknown-linux-muslbinary in release pipeline. Docker instructions updated for Graviton/ARM64. - IDE extensions: JetBrains (Kotlin/Gradle), Neovim (Lua), Sublime Text (Python), Emacs (Elisp) — all thin-client architecture.
- Security layer: PathJail (FD-based, single choke point for 42 tools), bounded shell capture, size caps, TOCTOU prevention in
ctx_edit, symlink leak fix inctx_search, prompt-injection fencing. - Unified Gain Engine:
GainScore(0–100),ModelPricing(embedded cost table),TaskClassifier(13 categories),ctx_gainMCP tool, TUI/Dashboard/CLI integration. - Docker/Claude Code MCP self-healing:
env.shre-injects MCP config when Claude overwrites~/.claude.json. Doctor detects and hints fix. - Compression deep optimization: Thompson Sampling bandits for adaptive thresholds, Tree-sitter AST pruning, IDF-weighted deduplication, Information-Bottleneck task filtering, Verbatim Compaction.
lean-ctx -cnow compresses on TTY (fixes #100): Previously skipped compression when stdout was a terminal, showing 0% savings.- Quality column in
ctx_benchmark: Shows per-strategy preservation score (AST + identifier + line preservation).
Fixed
- CLI
-cTTY bypass (#100):lean-ctx -c 'git status'now compresses even in terminal (setsLEAN_CTX_COMPRESS=1). - Windows
Instantoverflow: RRF eviction test usednow - Durationwhich underflows on Windows. Fixed withsleep-based offsets +checked_duration_since. - rustls-webpki CVE: Updated from 0.103.11 to 0.103.12 (wildcard/URI certificate name constraint fix).
- MCP server hangs on large projects: Parallelized tool calls prevent blocking.
- Dashboard ERR_EMPTY_RESPONSE in Docker: Bind host + panic recovery → HTTP 500 JSON instead of empty response.
- Kotlin graph analysis: AST-span-based symbol ranges for accurate call-graph edges.
Refactored
- Dead code elimination: Removed 598 lines (unused
eval.rs, CEP benchmark, dead CLI helpers). Reduced#[allow(dead_code)]from 32 to 5. - Cache store zero-copy: Replaced
CacheEntryclone with lightweightStoreResultstruct (no content duplication). - Entropy dedup: Precomputed n-gram sets with size-ratio filter (exact Jaccard, no allocation storms).
- Clippy clean: 0 warnings with
-D warningsacross all targets (1029 tests passing).
Community
- Merged PR #94 (responsive dashboard — @frpboy)
- Merged PR #95 (MCP performance — @frpboy)
- Merged PR #97 (Kotlin graph support — @Chokitus)
Upgrade
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxFull Changelog: v3.2.0...v3.2.0