github yvgude/lean-ctx v3.6.13

latest releases: v3.9.2, v3.9.1, v3.9.0...
one month ago

Added

  • Plan mode support for VS Code, Claude Code, and Windsurf — New plan_mode.rs module detects IDE plan/read-only contexts and exposes a curated subset of 12 read-only tools (ctx_read, ctx_search, ctx_tree, ctx_overview, ctx_plan, ctx_metrics, ctx_compress, ctx_session, ctx_knowledge, ctx_graph, ctx_retrieve, ctx_provider). lean-ctx setup auto-configures VS Code planAgent.additionalTools and Claude Code permissions.allow entries. Includes lean-ctx doctor plan mode status check
  • MCP readOnlyHint tool annotations — All read-only MCP tools now declare readOnlyHint: true in their tool definitions, enabling IDE plan agents to use them without explicit user approval. Write tools (ctx_edit, ctx_fill, ctx_delta, ctx_handoff, ctx_ledger, ctx_multi_read) correctly declare readOnlyHint: false
  • Dynamic tool filtering — New server/dynamic_tools.rs module filters exposed tools based on client capabilities. Plan-mode clients only see read-only tools; full-mode clients see all 62 tools
  • GitLab provider — Built-in GitLab data source provider (issues, merge requests, pipelines) activates automatically when GITLAB_TOKEN is set. Joins GitHub, Jira, and PostgreSQL as built-in providers
  • Provider consolidation pipeline (production-wired)apply_artifacts_to_stores() now runs in a background thread from both ctx_provider and ctx_preload, indexing provider data into BM25, Graph, Knowledge, and Session Cache. Previously, provider data was only cached — now it's fully searchable, generates cross-source hints in ctx_read, and contributes knowledge facts
  • MCP Bridge stdio transport support[providers.mcp_bridges.<name>] now accepts command + args for stdio-based MCP servers in addition to HTTP url. Bridges register with unique IDs (mcp:<name>) and support resources, read_resource, and tools actions
  • Cross-source hints in ctx_read — When reading a file, ctx_read now shows related issues, PRs, and external data linked via the graph index (e.g., "Related: [Issue] github://issues/42 — Auth bug")
  • ctx_semantic_search external result attribution — Search results from external providers now show clear type labels: [Issue], [PR], [Ticket], [Schema], [Wiki] with full provider URIs
  • lean-ctx doctor MCP bridge diagnostics — New diagnostic section validates configured MCP bridges (URL reachability, config completeness, auto_index status warning)
  • lean-ctx doctor plan mode check — Reports whether VS Code and Claude Code are configured for plan mode tool access
  • 13 wiring-proof integration tests — New provider_wiring_proof.rs test suite proves every connection in the provider pipeline is functional (consolidation → BM25/Graph/Knowledge/Cache → search/hints/recall). Catches "functional silos" where code exists but isn't connected to runtime
  • 10 E2E provider pipeline scenarios — New provider_pipeline_e2e.rs covers full pipeline, cross-source edges, knowledge extraction, MCP bridge registration, multi-source consolidation
  • Plan mode scenario tests — New plan_mode_scenarios.rs with 11 tests covering VS Code settings injection, Claude Code permissions, idempotency, merge behavior, and status detection
  • Power user worksession test suite — New power_user_worksession.rs with 12 end-to-end scenarios simulating a full coding session: initial read → edit → diff → search → knowledge → cache → overview → multi-read → compress → graph → context
  • Lock contention hardening tests — New lock_contention_hardening.rs with 14 scenarios testing bounded lock timeouts, concurrent access, I/O health escalation, and WSL2/NFS environment detection
  • LEAN_CTX_CLIENT_HINT env override — Client capability detection can now be overridden for testing and edge-case environments
  • lean-ctx doctor provider status — Shows active providers and their auth status
  • lean-ctx doctor Copilot CLI MCP check — Separate diagnostic for Copilot CLI MCP configuration (distinct from VS Code MCP)
  • VS Code Extension .vscode/mcp.json support — New standard path with type: "stdio" transport
  • ctx_ledger reset clears cache delivery flags — Prevents stale "already delivered" states
  • Knowledge.json size warning — Warns when knowledge file exceeds 1 MB during load
  • CLI smoke tests — New integration tests for gain --json, grep, ls, doctor commands

Fixed

  • PowerShell @args splatting fails on single commands_lc function now resolves the native command via Get-Command -CommandType Application before invocation, preventing "not recognized" errors when @args is used with compound argument strings
  • Fish shell lean-ctx-off leaks env varset -e LEAN_CTX_ENABLED (which removes the var) changed to set -gx LEAN_CTX_ENABLED 0 (which sets it to 0), matching Bash/Zsh behavior and preventing child shells from re-activating
  • Bash/Zsh lean-ctx-off leaks env varunset LEAN_CTX_ENABLED changed to export LEAN_CTX_ENABLED=0 for consistent disable semantics across shells
  • Provider init ignores project rootctx_provider and ctx_preload now call init_with_project_root(Some(root)) instead of init_builtin_providers(), enabling config-based provider discovery scoped to the actual project directory
  • Windows CI failure: dead is_running_in_powershell() — Removed unused #[cfg(windows)] function that triggered -Dwarnings failure on windows-latest CI
  • Lock contention in 12 MCP toolsctx_read, ctx_edit, ctx_delta, ctx_fill, ctx_handoff, ctx_knowledge, ctx_multi_read, ctx_smart_read, ctx_prefetch, ctx_ledger, ctx_preload, ctx_provider now use bounded lock acquisition with adaptive timeouts instead of indefinite waits
  • Adaptive timeout death spiral — SlowFs/Degraded environments now get longer timeouts (1.5×/2×), not shorter, preventing cascading failures
  • UTF-8 safe truncation — No more panics on multi-byte character boundaries in hook handlers, ctx_read, ctx_overview, and server dispatch
  • Cache staleness for missing files — A missing file is now correctly treated as stale (previously wasn't)
  • compound_lexer Unicode — Switched from byte-based to char-based parsing; fixed $(…) subshell detection
  • Windows shell output decoding — Tries UTF-8 first, then Active Code Page (ACP) as fallback
  • ctx_read lock contention — Returns actionable error message instead of hanging silently
  • ctx_read not-found — Provides actionable hint after retry failure
  • BM25 zstd decompression bomb — Bounded decode prevents memory exhaustion from malformed compressed index
  • Copilot hooks merge — No longer overwrites existing hooks during setup
  • ctx_knowledge rehydrate time budget — Capped at 10 seconds to prevent blocking
  • ctx_execute respects GIT_PAGER/PAGER — Only sets pager env vars when not already set by user

Changed

  • providers.auto_index default is now true — New installations automatically index provider data into BM25/Graph/Knowledge stores. Previously defaulted to false (cache-only)
  • MCP tool count — 61 → 62 (added ctx_provider)
  • Tool descriptions — Updated pkgdesc in AUR packages and description in Cargo.toml to reflect 62 tools
  • ctx_read post-dispatch — Enrichment bounded to 3s; ledger/eviction/elicitation run async (no longer inline in output)
  • VS Code/Copilot client detection — Now also recognizes "Visual Studio Code" and "vscode" client identifiers
  • Knowledge rehydrate limit — Maximum archives reduced from 12 to 4 for faster startup
  • Shell pattern pipeline — ANSI-stripped output flows through all compressor stages

Removed

  • Dead code cleanup — Removed Config::providers_mcp_bridges() (unused after init.rs refactoring), hints_from_index() (unused wrapper), is_running_in_powershell() (Windows-only, never called), unused ProjectIndex import
  • Inline eviction/elicitation hints in ctx_read response — Now only debug-logged, no longer appended to tool output

Upgrade

lean-ctx update                 # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Note: After upgrading via cargo/npm/brew, run lean-ctx setup to refresh shell aliases. lean-ctx update does this automatically.

Full Changelog: v3.6.13...v3.6.13

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.