knowledge-rag 4.2.0 → 4.3.1
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 +145 -51
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
### Your docs, your machine, zero cloud. Claude Code searches them natively.
|
|
18
18
|
|
|
19
19
|
Drop your PDFs, markdown, code, notebooks — **1800+ files, 39K chunks, indexed in under 3 minutes.**<br/>
|
|
20
|
-
Hybrid search (BM25 + semantic vectors + cross-encoder reranking) through
|
|
20
|
+
Hybrid search (BM25 + semantic vectors + cross-encoder reranking) through 13 MCP tools.<br/>
|
|
21
21
|
Everything runs locally via ONNX. No Docker, no Ollama, no API keys, no data leaves your machine.
|
|
22
22
|
|
|
23
23
|
```
|
|
@@ -26,7 +26,7 @@ pip install knowledge-rag → restart Claude Code → search_knowledge("your que
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**13 MCP Tools** | **Hybrid Search + Reranking** | **20 File Formats** | **Optional NVIDIA GPU** | **100% Local**
|
|
30
30
|
|
|
31
31
|
[What's New](#whats-new-in-v420) | [Supported Formats](#supported-formats) | [Installation](#installation) | [Configuration](#configuration) | [API Reference](#api-reference) | [Architecture](#architecture)
|
|
32
32
|
|
|
@@ -81,7 +81,7 @@ Or via CLI: `knowledge-rag --transport sse`
|
|
|
81
81
|
- **Prometheus metrics**: `/metrics` endpoint on separate port
|
|
82
82
|
- **Bearer auth**: Token validation for SSE/HTTP connections
|
|
83
83
|
|
|
84
|
-
All
|
|
84
|
+
All 13 MCP tools are instrumented with `@rate_limited` and `@instrument` decorators — zero overhead when features are disabled. Default transport remains **stdio** for full backwards compatibility.
|
|
85
85
|
|
|
86
86
|
> **Migration**: Existing users need zero changes. SSE mode is opt-in via `server.transport: "sse"` in config.yaml. See [Configuration](#configuration) for details.
|
|
87
87
|
|
|
@@ -205,7 +205,7 @@ See [Changelog](#changelog) for full history.
|
|
|
205
205
|
| **MMR Diversification** | Maximal Marginal Relevance reduces redundant results |
|
|
206
206
|
| **Persistent Model Cache** | Embedding models cached in `models_cache/` — survives reboots |
|
|
207
207
|
| **Auto-Migration** | Detects embedding dimension mismatch and rebuilds automatically |
|
|
208
|
-
| **
|
|
208
|
+
| **13 MCP Tools** | Full CRUD + search + evaluation via Claude Code |
|
|
209
209
|
|
|
210
210
|
---
|
|
211
211
|
|
|
@@ -217,7 +217,7 @@ See [Changelog](#changelog) for full history.
|
|
|
217
217
|
flowchart TB
|
|
218
218
|
subgraph MCP["MCP SERVER (FastMCP)"]
|
|
219
219
|
direction TB
|
|
220
|
-
TOOLS["
|
|
220
|
+
TOOLS["13 MCP Tools<br/>search | get | add | update | remove<br/>reindex | reindex_status | list | stats | url | similar | evaluate"]
|
|
221
221
|
end
|
|
222
222
|
|
|
223
223
|
subgraph SEARCH["HYBRID SEARCH ENGINE"]
|
|
@@ -392,7 +392,53 @@ flowchart LR
|
|
|
392
392
|
- Claude Code CLI
|
|
393
393
|
- *…or any other MCP client (Claude Desktop, Cursor, VS Code, Antigravity, opencode, Windsurf) — see [Use with other MCP clients](#use-with-other-mcp-clients)*
|
|
394
394
|
- ~200MB disk for model cache (auto-downloaded on first run)
|
|
395
|
-
- *Optional:* NVIDIA GPU + CUDA for accelerated embeddings (
|
|
395
|
+
- *Optional:* NVIDIA GPU + CUDA 12 for accelerated embeddings (see [GPU Acceleration](#gpu-acceleration) below)
|
|
396
|
+
|
|
397
|
+
### GPU Acceleration
|
|
398
|
+
|
|
399
|
+
GPU mode accelerates embedding generation during indexing and search. It requires an NVIDIA GPU with CUDA 12 support. No GPU? No problem — the server runs on CPU by default and GPU is entirely optional.
|
|
400
|
+
|
|
401
|
+
**Requirements:**
|
|
402
|
+
|
|
403
|
+
| Component | Minimum | How to check / get it |
|
|
404
|
+
|-----------|---------|----------------------|
|
|
405
|
+
| NVIDIA GPU (Turing+) | RTX 20xx / 30xx / 40xx / 50xx, or Tesla T4+ | `nvidia-smi` |
|
|
406
|
+
| NVIDIA Driver | ≥ 525 | `nvidia-smi` — [nvidia.com/drivers](https://www.nvidia.com/drivers) |
|
|
407
|
+
| CUDA 12 runtime | Provided by pip packages below | Automatic |
|
|
408
|
+
|
|
409
|
+
**Setup (2 steps):**
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# 1. Install GPU dependencies (onnxruntime-gpu + all CUDA 12 runtime DLLs)
|
|
413
|
+
pip install knowledge-rag[gpu]
|
|
414
|
+
|
|
415
|
+
# 2. Enable in config.yaml
|
|
416
|
+
# models:
|
|
417
|
+
# embedding:
|
|
418
|
+
# gpu: true
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
The `[gpu]` extra installs `onnxruntime-gpu` plus 7 NVIDIA CUDA 12 packages (`cublas`, `cudnn`, `cuda-runtime`, `cufft`, `cusparse`, `cusolver`, `curand`, `nvjitlink`) so you don't need a full CUDA Toolkit install.
|
|
422
|
+
|
|
423
|
+
**Verify GPU is active:**
|
|
424
|
+
|
|
425
|
+
On server startup, look for the GPU status banner:
|
|
426
|
+
```
|
|
427
|
+
============================================================
|
|
428
|
+
GPU STATUS: ACTIVE
|
|
429
|
+
Provider: CUDAExecutionProvider
|
|
430
|
+
Device: NVIDIA GeForce RTX 3080 Ti
|
|
431
|
+
VRAM: 12.0 GB
|
|
432
|
+
============================================================
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Or programmatically:
|
|
436
|
+
```bash
|
|
437
|
+
python -c "import onnxruntime; print(onnxruntime.get_available_providers())"
|
|
438
|
+
# Should include: 'CUDAExecutionProvider'
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
> **Fallback**: If CUDA is unavailable at runtime (wrong driver, missing DLLs, no GPU), the server falls back to CPU automatically with a `[WARN]` log — it never crashes. The `gpu: true` config is a preference, not a requirement.
|
|
396
442
|
|
|
397
443
|
### Install Methods
|
|
398
444
|
|
|
@@ -663,7 +709,7 @@ search_knowledge("lateral movement strategies", hybrid_alpha=1.0)
|
|
|
663
709
|
|
|
664
710
|
### Indexing
|
|
665
711
|
|
|
666
|
-
Documents are automatically indexed on first startup.
|
|
712
|
+
Documents are automatically indexed on first startup. All reindex operations run **in background** — they return immediately and you poll progress via `get_reindex_status()`:
|
|
667
713
|
|
|
668
714
|
```python
|
|
669
715
|
# Incremental: only re-index changed files (fast)
|
|
@@ -674,6 +720,10 @@ reindex_documents(force=True)
|
|
|
674
720
|
|
|
675
721
|
# Nuclear rebuild: delete everything, re-embed all (use after model change)
|
|
676
722
|
reindex_documents(full_rebuild=True)
|
|
723
|
+
|
|
724
|
+
# Poll progress (lightweight, no full stats computation)
|
|
725
|
+
get_reindex_status()
|
|
726
|
+
# → {"reindex": {"active": true, "percent": 56, "progress": "2090/3734", ...}}
|
|
677
727
|
```
|
|
678
728
|
|
|
679
729
|
### Evaluating Retrieval Quality
|
|
@@ -755,14 +805,39 @@ Retrieve the full content of a specific document.
|
|
|
755
805
|
|
|
756
806
|
#### `reindex_documents`
|
|
757
807
|
|
|
758
|
-
Index or reindex all documents in the knowledge base.
|
|
808
|
+
Index or reindex all documents in the knowledge base. **Runs in background** — returns immediately. Poll progress via `get_reindex_status()`.
|
|
759
809
|
|
|
760
810
|
| Parameter | Type | Default | Description |
|
|
761
811
|
|-----------|------|---------|-------------|
|
|
762
812
|
| `force` | bool | false | Smart reindex: detects changes, rebuilds BM25. Fast. |
|
|
763
813
|
| `full_rebuild` | bool | false | Nuclear rebuild: deletes everything, re-embeds all documents. Use after model change. |
|
|
764
814
|
|
|
765
|
-
**Returns:**
|
|
815
|
+
**Returns:** `{"status": "started", "operation": "..."}` immediately. If already running, returns `{"status": "already_running", "progress": "1200/3734"}`.
|
|
816
|
+
|
|
817
|
+
---
|
|
818
|
+
|
|
819
|
+
#### `get_reindex_status`
|
|
820
|
+
|
|
821
|
+
Get the current status of a background reindex operation. Lightweight — does not compute full index statistics.
|
|
822
|
+
|
|
823
|
+
**Returns (active):**
|
|
824
|
+
```json
|
|
825
|
+
{
|
|
826
|
+
"status": "success",
|
|
827
|
+
"reindex": {
|
|
828
|
+
"active": true,
|
|
829
|
+
"operation": "nuclear_rebuild",
|
|
830
|
+
"progress": "1200/3734",
|
|
831
|
+
"percent": 32,
|
|
832
|
+
"indexed": 1200,
|
|
833
|
+
"skipped": 0,
|
|
834
|
+
"errors": 0,
|
|
835
|
+
"started_at": "2026-06-17T18:29:49"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
**Returns (idle):** `{"status": "success", "reindex": {"active": false}}`
|
|
766
841
|
|
|
767
842
|
---
|
|
768
843
|
|
|
@@ -1071,7 +1146,7 @@ For `.md` files, chunking splits at `##` and `###` header boundaries first. Sect
|
|
|
1071
1146
|
|-------|---------|-------------|
|
|
1072
1147
|
| `models.embedding.model` | `BAAI/bge-small-en-v1.5` | Embedding model (ONNX, runs locally) |
|
|
1073
1148
|
| `models.embedding.dimensions` | 384 | Vector dimensions (must match model) |
|
|
1074
|
-
| `models.embedding.gpu` | false | Enable CUDA GPU acceleration.
|
|
1149
|
+
| `models.embedding.gpu` | false | Enable CUDA GPU acceleration. See [GPU Acceleration](#gpu-acceleration) for full setup |
|
|
1075
1150
|
| `models.reranker.enabled` | true | Enable cross-encoder reranking |
|
|
1076
1151
|
| `models.reranker.model` | `Xenova/ms-marco-MiniLM-L-6-v2` | Reranker model |
|
|
1077
1152
|
| `models.reranker.top_k_multiplier` | 3 | Fetch N*multiplier candidates for reranking |
|
|
@@ -1324,6 +1399,64 @@ Common issues:
|
|
|
1324
1399
|
|
|
1325
1400
|
## Changelog
|
|
1326
1401
|
|
|
1402
|
+
### Unreleased
|
|
1403
|
+
|
|
1404
|
+
### v4.3.1 (2026-06-22) — Hybrid Search Fixes
|
|
1405
|
+
|
|
1406
|
+
- **FIX**: Accept `"general"` as a valid category in `search_knowledge`. The parser hardcodes `"general"` as the fallback in `_detect_category` (`ingestion.py`), but the validator only built `valid_categories` from `config.keyword_routes` + `config.category_mappings.values()` — so users who customized `config.yaml` and dropped the default `"general": "general"` mapping hit `Invalid category` even though the index contained `general` documents. Validator now always tolerates `"general"`. (#98, thanks @Hohlas)
|
|
1407
|
+
- **FIX**: Skip BM25-only search results when Chroma can no longer resolve the chunk ID. Stale BM25 indices (typically right after `remove_document` or in the window between async reindex and BM25 rebuild) returned hits whose `collection.get()` came back empty; the previous fallback inserted entries with `document=""` / `metadata={}` into the reranker, polluting results with empty matches. The pipeline now `continue`s past those, dropping the stale hit cleanly. (#98, thanks @Hohlas)
|
|
1408
|
+
- **TEST**: Added `tests/test_pr98_regression.py` (4 tests) pinning both contracts so future refactors cannot silently revert either fix. Test count baseline: 227 → 231. (#99)
|
|
1409
|
+
- **CI**: Bumped `[tool.mypy] python_version` from 3.11 to 3.12 to accept PEP 695 `type` statements in the numpy stub (`numpy/__init__.pyi`) which were breaking the Pillar 7 strict gate. Only affects static analysis; `requires-python = ">=3.11"` unchanged. (#100)
|
|
1410
|
+
|
|
1411
|
+
### v4.3.0 (2026-06-17) — Async Reindex, GPU CUDA 12, 13th MCP Tool
|
|
1412
|
+
|
|
1413
|
+
- **NEW**: `get_reindex_status` MCP tool — lightweight reindex progress polling without computing full index stats. Returns active/idle status, percent, processed/total, errors, and last result.
|
|
1414
|
+
- **NEW**: `reindex_documents` now runs in background via daemon thread — returns immediately with `{"status": "started"}`. Eliminates MCP timeout on large document sets (5K+ files). Concurrent calls return `already_running` with current progress.
|
|
1415
|
+
- **NEW**: GPU acceleration with full CUDA 12 support — `onnxruntime-gpu` + 7 NVIDIA pip packages (`cublas`, `cudnn`, `cuda-runtime`, `cufft`, `cusparse`, `cusolver`, `curand`, `nvjitlink`). Server auto-detects GPU on startup with 4-step verification (providers, DLLs, nvidia-smi, session creation). Falls back to CPU gracefully.
|
|
1416
|
+
- **NEW**: `_setup_cuda_dll_paths()` adds NVIDIA pip package DLL directories to `PATH` automatically on Windows — onnxruntime finds CUDA 12 DLLs without a full CUDA Toolkit install.
|
|
1417
|
+
- **DEPS**: `[gpu]` extra expanded from 3 to 8 packages (added `cufft`, `cusparse`, `cusolver`, `curand`, `nvjitlink`).
|
|
1418
|
+
- **FIX**: GPU status reporting now uses actual ONNX session creation test instead of just checking `get_available_providers()` — prevents false "GPU ACTIVE" when CUDA DLLs are missing.
|
|
1419
|
+
- **DOCS**: GPU Acceleration section rewritten with complete requirements table, setup steps, verification instructions, and fallback behavior.
|
|
1420
|
+
- **DOCS**: Tool reference updated — `reindex_documents` async behavior documented, `get_reindex_status` reference added.
|
|
1421
|
+
- **TEST**: Backwards-compat baseline updated for 13 MCP tools.
|
|
1422
|
+
|
|
1423
|
+
### v4.2.0 (2026-06-17) — Search Performance & Output Quality
|
|
1424
|
+
|
|
1425
|
+
- **PERF**: Custom inverted-index BM25 replaces `rank-bm25` full-corpus scan — 128× faster keyword search on 50K+ chunk corpora. Only documents containing query terms are scored via posting lists.
|
|
1426
|
+
- **PERF**: `numpy.argpartition` for O(n) top-k selection instead of O(n log n) sort.
|
|
1427
|
+
- **PERF**: Batched adjacent chunk fetch — single ChromaDB `collection.get()` call replaces N round-trips per result.
|
|
1428
|
+
- **PERF**: O(1) reverse lookup via `_source_to_docid` dict eliminates linear scans of `_indexed_docs` in `search_similar`, `update_document`, `remove_document`, and `_expand_with_adjacent_chunks`.
|
|
1429
|
+
- **NEW**: `snippet_mode` parameter on `search_knowledge` (default: `true`) — truncates content to ~500 chars at natural break points with `content_length` field. Reduces token consumption by ~72%.
|
|
1430
|
+
- **NEW**: `min_score` parameter on `search_knowledge` (default: `0.0`) — filters results below a normalized relevance threshold. Response includes `filtered_by_score` count.
|
|
1431
|
+
- **NEW**: `filtered_by_score` field in search response JSON for transparency.
|
|
1432
|
+
- **DEPS**: `numpy` added as direct dependency (was transitive via fastembed); `rank-bm25` import removed from server.py.
|
|
1433
|
+
- **TEST**: 6 new tests for `min_score` filtering and `snippet_mode` truncation.
|
|
1434
|
+
- **TEST**: Updated backwards-compat baseline to include new `search_knowledge` parameters.
|
|
1435
|
+
|
|
1436
|
+
### v4.1.2 (2026-06-17)
|
|
1437
|
+
|
|
1438
|
+
- **FIX**: `_save_metadata` dict snapshot prevents concurrent modification crash during file watcher events.
|
|
1439
|
+
- **STYLE**: ruff format applied to server.py.
|
|
1440
|
+
|
|
1441
|
+
### v4.1.1 (2026-06-17)
|
|
1442
|
+
|
|
1443
|
+
- **FIX**: All `_indexed_docs` iterations now use `list()` snapshot, preventing `dictionary changed size during iteration` crash when FileWatcher modifies the index concurrently with MCP tool calls (affects `search_knowledge`, `search_similar`, `update_document`, `remove_document`, `evaluate_retrieval`, `list_categories`, `list_documents`)
|
|
1444
|
+
|
|
1445
|
+
### v4.1.0 (2026-06-17)
|
|
1446
|
+
|
|
1447
|
+
- **Added:** `query_expansion_groups` config for symmetric synonym expansion (#92)
|
|
1448
|
+
- **Improved:** `expand_query()` now returns deterministic expansion order (set → ordered list with dedup)
|
|
1449
|
+
|
|
1450
|
+
### v4.0.1 (2026-06-16)
|
|
1451
|
+
|
|
1452
|
+
- **FIX**: Orphan cleanup now runs before indexing loop, preventing chunk loss when files are moved (#90).
|
|
1453
|
+
- **FIX**: Chunk deduplication is now per-document instead of global, preventing cross-document chunk deletion (#91).
|
|
1454
|
+
- **FIX**: Added `on_moved` handler to `DocumentWatcher` for proper file move detection.
|
|
1455
|
+
- **FIX**: Startup preflight probes ChromaDB in a child process and moves crashing persistent indexes to `data/backups/auto-repair-*` before MCP initialization.
|
|
1456
|
+
- **FIX**: Reranker load failures now fall back to RRF ordering instead of failing `search_knowledge` on offline machines.
|
|
1457
|
+
- **FIX**: Virtualenv project-root detection now handles Python symlinks that resolve to the system interpreter.
|
|
1458
|
+
- **NEW**: `knowledge-rag-guarded` console script kept as an explicit guarded startup alias.
|
|
1459
|
+
|
|
1327
1460
|
### v4.0.0 (2026-06-09) — Enterprise Concurrent Access
|
|
1328
1461
|
|
|
1329
1462
|
- **NEW**: SSE and streamable-http transport modes — 1 server serves N clients (`server.transport: "sse"` in config.yaml or `--transport sse` CLI).
|
|
@@ -1331,7 +1464,7 @@ Common issues:
|
|
|
1331
1464
|
- **NEW**: ChromaDB WAL mode enabled automatically in SSE/HTTP mode for concurrent read performance.
|
|
1332
1465
|
- **NEW**: Optional rate limiting — sliding-window counter, configurable RPM and burst, disabled by default.
|
|
1333
1466
|
- **NEW**: Optional Prometheus metrics endpoint — tool call counts, latency histograms, separate port, disabled by default.
|
|
1334
|
-
- **NEW**: All
|
|
1467
|
+
- **NEW**: All 13 MCP tools instrumented with `@rate_limited` and `@instrument` decorators (zero-cost when disabled).
|
|
1335
1468
|
- **NEW**: `--transport` CLI override for Docker/systemd deployments.
|
|
1336
1469
|
- **NEW**: `pip install knowledge-rag[server]` optional dependency for SSE/HTTP (uvicorn).
|
|
1337
1470
|
- **CHANGED**: SSE/HTTP mode auto-enables single-instance lock (port collision prevention).
|
|
@@ -1359,7 +1492,7 @@ Common issues:
|
|
|
1359
1492
|
- **NEW** Property-based fuzzing of all parsers via Hypothesis (`tests/test_ingestion_property.py`) — 200 random examples per CI run.
|
|
1360
1493
|
- **NEW** Memory baseline regression tests (`tests/test_memory_baseline.py`, cross-platform via psutil) — RSS bounded under 1000 queries; nightly soak amplifies to 50K iterations.
|
|
1361
1494
|
- **NEW** Property/locale/format/preset matrices (`tests/test_presets.py`, `tests/test_locale.py`, `tests/test_format_smoke.py`).
|
|
1362
|
-
- **NEW** Backwards-compatibility regression tests (`tests/test_backwards_compat.py`) — legacy YAML configs from v3.6.0 / v3.7.0 still parse; all
|
|
1495
|
+
- **NEW** Backwards-compatibility regression tests (`tests/test_backwards_compat.py`) — legacy YAML configs from v3.6.0 / v3.7.0 still parse; all 13 MCP tool parameter names frozen.
|
|
1363
1496
|
- **NEW** AST-based public API surface diff (`scripts/check_api_surface.py`) — any breaking change blocks merge, baseline at `.github/api-surface-baseline.json`.
|
|
1364
1497
|
- **NEW** CHANGELOG enforcement (`scripts/check_changelog.py`) — user-facing PRs must add a bullet under `## Unreleased`; bypass via `skip-changelog` label.
|
|
1365
1498
|
- **NEW** Test count anti-regression (`scripts/check_test_count.py`) — guards against silent test deletion.
|
|
@@ -1389,45 +1522,6 @@ Common issues:
|
|
|
1389
1522
|
- **CHORE**: pytest `tmp_path_retention_count=1` to avoid Windows atexit cleanup race in CI.
|
|
1390
1523
|
- **ROADMAP**: Tracked v4.0 shared-service architecture (one daemon, many thin MCP clients) as the long-term fix for multi-process resource duplication. (#34)
|
|
1391
1524
|
|
|
1392
|
-
### Unreleased
|
|
1393
|
-
|
|
1394
|
-
### v4.2.0 (2026-06-17) — Search Performance & Output Quality
|
|
1395
|
-
|
|
1396
|
-
- **PERF**: Custom inverted-index BM25 replaces `rank-bm25` full-corpus scan — 128× faster keyword search on 50K+ chunk corpora. Only documents containing query terms are scored via posting lists.
|
|
1397
|
-
- **PERF**: `numpy.argpartition` for O(n) top-k selection instead of O(n log n) sort.
|
|
1398
|
-
- **PERF**: Batched adjacent chunk fetch — single ChromaDB `collection.get()` call replaces N round-trips per result.
|
|
1399
|
-
- **PERF**: O(1) reverse lookup via `_source_to_docid` dict eliminates linear scans of `_indexed_docs` in `search_similar`, `update_document`, `remove_document`, and `_expand_with_adjacent_chunks`.
|
|
1400
|
-
- **NEW**: `snippet_mode` parameter on `search_knowledge` (default: `true`) — truncates content to ~500 chars at natural break points with `content_length` field. Reduces token consumption by ~72%.
|
|
1401
|
-
- **NEW**: `min_score` parameter on `search_knowledge` (default: `0.0`) — filters results below a normalized relevance threshold. Response includes `filtered_by_score` count.
|
|
1402
|
-
- **NEW**: `filtered_by_score` field in search response JSON for transparency.
|
|
1403
|
-
- **DEPS**: `numpy` added as direct dependency (was transitive via fastembed); `rank-bm25` import removed from server.py.
|
|
1404
|
-
- **TEST**: 6 new tests for `min_score` filtering and `snippet_mode` truncation.
|
|
1405
|
-
- **TEST**: Updated backwards-compat baseline to include new `search_knowledge` parameters.
|
|
1406
|
-
|
|
1407
|
-
### v4.1.2 (2026-06-17)
|
|
1408
|
-
|
|
1409
|
-
- **FIX**: `_save_metadata` dict snapshot prevents concurrent modification crash during file watcher events.
|
|
1410
|
-
- **STYLE**: ruff format applied to server.py.
|
|
1411
|
-
|
|
1412
|
-
### v4.1.1 (2026-06-17)
|
|
1413
|
-
|
|
1414
|
-
- **FIX**: All `_indexed_docs` iterations now use `list()` snapshot, preventing `dictionary changed size during iteration` crash when FileWatcher modifies the index concurrently with MCP tool calls (affects `search_knowledge`, `search_similar`, `update_document`, `remove_document`, `evaluate_retrieval`, `list_categories`, `list_documents`)
|
|
1415
|
-
|
|
1416
|
-
### v4.1.0 (2026-06-17)
|
|
1417
|
-
|
|
1418
|
-
- **Added:** `query_expansion_groups` config for symmetric synonym expansion (#92)
|
|
1419
|
-
- **Improved:** `expand_query()` now returns deterministic expansion order (set → ordered list with dedup)
|
|
1420
|
-
|
|
1421
|
-
### v4.0.1 (2026-06-16)
|
|
1422
|
-
|
|
1423
|
-
- **FIX**: Orphan cleanup now runs before indexing loop, preventing chunk loss when files are moved (#90).
|
|
1424
|
-
- **FIX**: Chunk deduplication is now per-document instead of global, preventing cross-document chunk deletion (#91).
|
|
1425
|
-
- **FIX**: Added `on_moved` handler to `DocumentWatcher` for proper file move detection.
|
|
1426
|
-
- **FIX**: Startup preflight probes ChromaDB in a child process and moves crashing persistent indexes to `data/backups/auto-repair-*` before MCP initialization.
|
|
1427
|
-
- **FIX**: Reranker load failures now fall back to RRF ordering instead of failing `search_knowledge` on offline machines.
|
|
1428
|
-
- **FIX**: Virtualenv project-root detection now handles Python symlinks that resolve to the system interpreter.
|
|
1429
|
-
- **NEW**: `knowledge-rag-guarded` console script kept as an explicit guarded startup alias.
|
|
1430
|
-
|
|
1431
1525
|
### v3.6.2 (2026-04-23)
|
|
1432
1526
|
|
|
1433
1527
|
- **INFRA**: NPM provenance attestation (SLSA supply chain security), full README on npm page
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knowledge-rag",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "Local RAG System for Claude Code — Hybrid search + Cross-encoder Reranking +
|
|
3
|
+
"version": "4.3.1",
|
|
4
|
+
"description": "Local RAG System for Claude Code — Hybrid search + Cross-encoder Reranking + 13 MCP Tools + 20 Format Parsers. Zero external servers.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"knowledge-rag": "./bin/cli.js"
|
|
7
7
|
},
|