Releases: ShmidtS/context-mode
Releases · ShmidtS/context-mode
Release list
v1.7.2 — local index directory fix
Bug Fixes
- local-index: Ensure
.context-mode/parent directory is created before openingcode-index.db.better-sqlite3creates the file but not intermediate directories, causingctx_local_index/ctx_local_searchto fail with "Cannot open database because the directory does not exist" on first use.
Verification
- Build passes (
npm run build) - All 16 local-indexer + searcher tests pass
- CLI
local-index,local-search,local-reposverified end-to-end
context-mode v1.7.1 — Build fix
What's New in 1.7.1
Fix
- esbuild externals — added
onnxruntime-nodeto esbuild external dependencies list. Prevents build failures caused by esbuild attempting to bundle native.nodebindings from onnxruntime-node.
1.7.0 Features (see full release notes)
- Local code indexing with Merkle diff + hybrid search
- Semantic chunking via tree-sitter + tiktoken fallback
- FTS5 + vector hybrid search with ONNX/Ollama embeddings
- CLI and MCP tools for local code indexing
Migration
No breaking changes. Install/update via:
npm install -g ShmidtS/context-modecontext-mode v1.7.0 — Local Code Indexing
What's New
Local Code Indexing (Merkle diff + hybrid search)
- Merkle-style incremental indexing — SHA-256 + mtime diff. Re-indexes only changed files.
- Semantic chunking — tree-sitter AST extraction (functions, classes, interfaces, methods) with tiktoken fallback for unsupported languages.
- FTS5 + vector hybrid search — BM25 full-text ranking fused with cosine similarity from local embeddings.
- ONNX / Ollama / zero-vector fallback —
all-MiniLM-L6-v2viaonnxruntime-node, Ollama API, or graceful FTS5-only degradation. - Cross-encoder reranking — optional
ms-marco-MiniLM-L-6-v2ONNX reranker + heuristic scoring fallback. - File watcher —
fs.watchwith 1-second debounce; persists watch list to~/.context-mode/watched.json. - CLI commands:
local-index,local-search,local-repos,local-status. - MCP tools:
ctx_local_index,ctx_local_search,ctx_local_status,ctx_local_repos,ctx_local_watch,ctx_local_unwatch. - WAL-safe SQLite schema — dedicated
code-index.dbwith FTS5 virtual table, vectors BLOB store, and jobs tracking.
Technical Details
- 384-d embeddings, batch size 32.
- Tiktoken truncation for result formatting.
- Lazy model download via
.urlmarkers in~/.context-mode/models/. - WAL mode +
mmap_size = 256MBfor read-heavy search workloads.
v1.6.2 — Graph analytics fix & graphify-style report
What's Changed
Fix
- Eliminated N+1 SQLite queries in
ctx_graph_analyze. Analytics now builds an in-memory snapshot in a single batch (3 queries), preventing timeouts on large vaults.
Feature
- Graphify-style report:
ctx_graph_analyzenow returnsmarkdownReport(human-readable report) andtokenEstimate(approximate token reduction vs reading raw notes). - Plain-English explanations: each surprising connection includes
explanation(cross-module, cross-file-type, no shared tags).
Documentation
- Vault graph tools (
ctx_vault_graph,ctx_graph_analyze) are now documented as active by default inskills/context-mode/SKILL.md. skills/improve-codebase-architecture/SKILL.mdreferences vault graph analysis before codebase exploration.
Technical
- Added
getAllNodes()andgetNodeTagMap()batch read methods toVaultGraphStore. - Union-Find clustering replaced per-node BFS in community detection for O(E α(V)) complexity.
context-mode v1.6.1
Full Changelog: v1.6.0...v1.6.1
v1.6.0
What's Changed
Refactoring & Architecture
- Decomposed monolithic modules following DRY/SRP principles
shared.ts(970+ lines) →stats.ts,batch-helpers.ts,paths.ts,security-helpers.ts,snippet.ts,vault-lifecycle.tswith barrel re-exportsstore.ts(1609 lines) →schema.ts,chunking.ts,reranking.ts,vocabulary.ts,search-helpers.ts,content-store.ts,types.tswith barrel re-exports- Extracted single
reciprocalRankFuseimplementation from 3 duplicate RRF copies
New Features
- Graphify integration: confidence-tagged edges (
EXTRACTED/INFERRED/AMBIGUOUS) in vault graph analytics - Composite surprise scoring and
filterEdgesByConfidencefor vault graph queries - Semantic search enabled by default (removed env-var gates)
- Per-platform skill files:
SKILL-claude.md,SKILL-codex.md,SKILL-cursor.md,SKILL-gemini.md,SKILL-copilot.md
Fixes
- Updated all test paths for new module decomposition (2457 tests pass)
- Added vendor type declarations for
@clack/promptsandpicocolors - Cleaned VS Code settings for workspace TypeScript SDK
Full Changelog: v1.5.0...v1.6.0
v1.5.0
v1.4.4
Fixes
ctx_dead_codefalsely flagged reachable entry points on Windows due to backslash path separator mismatch in basename extraction.- Added language-agnostic
ENTRY_STEMSso auto-detection works for any source file (Python, Go, Rust, PHP, etc.), not only.ts/.tsx/.js/.jsx. - Added
pi.extensionsandopenclaw.extensionsparsing todetectPackageJsonEntryPoints, preventing plugin source files from being marked dead.
Constraint: MCP server restart required for the fix to take effect in live sessions.
v1.4.3
Bug Fixes
- Fix ESM dynamic require crash in tree-sitter loader by switching from
require()toawait import()insrc/vault/ast-parser.tsandsrc/vault/symbol-graph.ts. The esbuild ESM bundle replacedrequire()with__require()shim that threw "Dynamic require is not supported" on Node.js, causing MCP connection closed on plugin install/update. - Add auto-rebuild fallback in
start.mjs: ifserver.bundle.mjsfails to load, triggernpm run buildbefore falling back.
Internal
- chore(release): bump version to 1.4.3
v1.4.2
Bug Fixes
- Fixed false "outdated" version warnings —
__pkg_dirresolution walked up fromsrc/tools/and failed to findpackage.json, causingVERSIONto always be"unknown". Now walks up the directory tree looking for apackage.jsonwithname: "context-mode". - Fixed
semverNewerwith invalid versions —semverNewer("1.4.1", "unknown")returnedtruedue toNaNhandling. Added guards for"unknown"and non-numeric version strings.
Docs
- Removed badges and improved source install instructions in README.