cortex-local 2.0.2__tar.gz → 2.0.4__tar.gz
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.
- {cortex_local-2.0.2 → cortex_local-2.0.4}/PKG-INFO +3 -1
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/embedder.py +17 -1
- {cortex_local-2.0.2 → cortex_local-2.0.4}/pyproject.toml +4 -1
- {cortex_local-2.0.2 → cortex_local-2.0.4}/README.md +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/__init__.py +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/cli.py +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/config.py +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/indexer.py +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/mcp_server.py +0 -0
- {cortex_local-2.0.2 → cortex_local-2.0.4}/cortex/state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cortex-local
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: Local semantic search MCP server — notes + code, embedded Qdrant, fastembed
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Requires-Dist: click>=8.0.0
|
|
@@ -8,6 +8,8 @@ Requires-Dist: fastembed>=0.4.0
|
|
|
8
8
|
Requires-Dist: mcp[cli]>=1.0.0
|
|
9
9
|
Requires-Dist: networkx>=3.0
|
|
10
10
|
Requires-Dist: qdrant-client>=1.17.0
|
|
11
|
+
Provides-Extra: legacy
|
|
12
|
+
Requires-Dist: numpy==1.26.4; extra == 'legacy'
|
|
11
13
|
Description-Content-Type: text/markdown
|
|
12
14
|
|
|
13
15
|
# cortex-local
|
|
@@ -6,8 +6,22 @@ _dense = None
|
|
|
6
6
|
_sparse = None
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
def _check_numpy() -> None:
|
|
10
|
+
try:
|
|
11
|
+
import numpy # noqa: F401
|
|
12
|
+
except RuntimeError as e:
|
|
13
|
+
if "X86_V2" in str(e) or "baseline" in str(e).lower():
|
|
14
|
+
raise RuntimeError(
|
|
15
|
+
f"NumPy requires CPU features your machine lacks.\n"
|
|
16
|
+
f'Reinstall with: pipx install "cortex-local[legacy]"\n'
|
|
17
|
+
f"(Original error: {e})"
|
|
18
|
+
) from None
|
|
19
|
+
raise
|
|
20
|
+
|
|
21
|
+
|
|
9
22
|
def embed(text: str) -> list:
|
|
10
23
|
"""Dense embedding via fastembed nomic-embed-text (768 dims)."""
|
|
24
|
+
_check_numpy()
|
|
11
25
|
global _dense
|
|
12
26
|
if _dense is None:
|
|
13
27
|
from fastembed import TextEmbedding
|
|
@@ -27,7 +41,9 @@ def sparse_embed(text: str) -> tuple:
|
|
|
27
41
|
|
|
28
42
|
def pull_models() -> None:
|
|
29
43
|
"""Pre-download embedding models (run at install time)."""
|
|
30
|
-
print("Pulling fastembed models...")
|
|
44
|
+
print("Pulling fastembed models (this may take a few minutes on first run)...")
|
|
45
|
+
print(" [1/2] Downloading nomic-embed-text-v1.5 (~270 MB)...", flush=True)
|
|
31
46
|
embed("warmup")
|
|
47
|
+
print(" [2/2] Downloading BM25 sparse model...", flush=True)
|
|
32
48
|
sparse_embed("warmup")
|
|
33
49
|
print("Models ready.")
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cortex-local"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.4"
|
|
8
8
|
description = "Local semantic search MCP server — notes + code, embedded Qdrant, fastembed"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -16,6 +16,9 @@ dependencies = [
|
|
|
16
16
|
"networkx>=3.0",
|
|
17
17
|
]
|
|
18
18
|
|
|
19
|
+
[project.optional-dependencies]
|
|
20
|
+
legacy = ["numpy==1.26.4"]
|
|
21
|
+
|
|
19
22
|
[project.scripts]
|
|
20
23
|
cortex = "cortex.cli:cli"
|
|
21
24
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|