cortex-vec 0.7.0__tar.gz → 0.8.0__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_vec-0.7.0/src/cortex_vec.egg-info → cortex_vec-0.8.0}/PKG-INFO +5 -5
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/README.md +4 -4
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/pyproject.toml +1 -1
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/cli.py +1 -1
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/config.py +1 -1
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/parser.py +4 -2
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/synonyms.py +2 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0/src/cortex_vec.egg-info}/PKG-INFO +5 -5
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec.egg-info/SOURCES.txt +1 -0
- cortex_vec-0.8.0/tests/test_no_weekly_type.py +39 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/LICENSE +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/NOTICE +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/setup.cfg +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/__init__.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/bm25.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/distill_plan.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/distill_queue.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/__init__.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/adapters.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/corpus.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/report.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/run.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/eval/score.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/fusion.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/graph.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/raw_map.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/raw_page.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/raw_source.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/raw_span.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/raw_view.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/reclaim.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/rerank.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/store.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec/tokenize.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec.egg-info/dependency_links.txt +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec.egg-info/entry_points.txt +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec.egg-info/requires.txt +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/src/cortex_vec.egg-info/top_level.txt +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_adapters.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_bm25.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_bm25_synonym.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_cmd_search.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_cmd_search_flags.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_config.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_config_plan2.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_corpus.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_distill_plan.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_distill_queue.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_diversify.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_graph.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_rerank.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_rrf.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_search.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_fusion_synonym.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_graph_build.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_graph_stream.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_lockstep.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_raw_map.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_raw_page.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_raw_source.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_raw_span.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_raw_view.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_rebuild_bm25_only.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_reclaim.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_report.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_rerank.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_run.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_score.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_smoke.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_synonyms.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_tokenize.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_vector_stream.py +0 -0
- {cortex_vec-0.7.0 → cortex_vec-0.8.0}/tests/test_wikilinks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cortex-vec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Vector store CLI for the cortex vault — hybrid BM25 + embedding retrieval over a markdown knowledge vault
|
|
5
5
|
Author: XBlueSky
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -31,7 +31,7 @@ Dynamic: license-file
|
|
|
31
31
|
|
|
32
32
|
# cortex-vec
|
|
33
33
|
|
|
34
|
-
Vector store CLI for the [
|
|
34
|
+
Vector store CLI for the [cortexes](https://github.com/XBlueSky/cortexes)
|
|
35
35
|
knowledge vault — hybrid retrieval over a plain-markdown vault, fusing a
|
|
36
36
|
persistent BM25 index with OpenAI-embedding vector search (ChromaDB) via
|
|
37
37
|
Reciprocal Rank Fusion. Handles mixed Chinese/English content.
|
|
@@ -58,11 +58,11 @@ cortex-vec search "nginx certificate" --n 5
|
|
|
58
58
|
cortex-vec status # index health: vector + BM25 entry counts
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Configuration lives in `~/.cortex/config.json` (created by the
|
|
62
|
-
plugin's `/
|
|
61
|
+
Configuration lives in `~/.cortex/config.json` (created by the Cortexes
|
|
62
|
+
plugin's `/cortexes:genesis` command). `OPENAI_API_KEY` is required for
|
|
63
63
|
embeddings; without it, `search` automatically degrades to BM25-only.
|
|
64
64
|
|
|
65
65
|
This package is the retrieval backend of the
|
|
66
|
-
[
|
|
66
|
+
[Cortexes Claude Code plugin](https://github.com/XBlueSky/cortexes) — session
|
|
67
67
|
recording, memory distillation, and indexed retrieval for Claude Code. See
|
|
68
68
|
the repository for the full documentation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cortex-vec
|
|
2
2
|
|
|
3
|
-
Vector store CLI for the [
|
|
3
|
+
Vector store CLI for the [cortexes](https://github.com/XBlueSky/cortexes)
|
|
4
4
|
knowledge vault — hybrid retrieval over a plain-markdown vault, fusing a
|
|
5
5
|
persistent BM25 index with OpenAI-embedding vector search (ChromaDB) via
|
|
6
6
|
Reciprocal Rank Fusion. Handles mixed Chinese/English content.
|
|
@@ -27,11 +27,11 @@ cortex-vec search "nginx certificate" --n 5
|
|
|
27
27
|
cortex-vec status # index health: vector + BM25 entry counts
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Configuration lives in `~/.cortex/config.json` (created by the
|
|
31
|
-
plugin's `/
|
|
30
|
+
Configuration lives in `~/.cortex/config.json` (created by the Cortexes
|
|
31
|
+
plugin's `/cortexes:genesis` command). `OPENAI_API_KEY` is required for
|
|
32
32
|
embeddings; without it, `search` automatically degrades to BM25-only.
|
|
33
33
|
|
|
34
34
|
This package is the retrieval backend of the
|
|
35
|
-
[
|
|
35
|
+
[Cortexes Claude Code plugin](https://github.com/XBlueSky/cortexes) — session
|
|
36
36
|
recording, memory distillation, and indexed retrieval for Claude Code. See
|
|
37
37
|
the repository for the full documentation.
|
|
@@ -27,7 +27,7 @@ def main():
|
|
|
27
27
|
p_search = sub.add_parser("search", help="Semantic search")
|
|
28
28
|
p_search.add_argument("query", help="Search query text")
|
|
29
29
|
p_search.add_argument("--repo", help="Filter by repo")
|
|
30
|
-
p_search.add_argument("--type", help="Filter by type (note/project
|
|
30
|
+
p_search.add_argument("--type", help="Filter by type (note/project)")
|
|
31
31
|
p_search.add_argument("--category", help="Filter by category")
|
|
32
32
|
p_search.add_argument("--n", type=int, default=5, help="Number of results")
|
|
33
33
|
p_search.add_argument("--no-bm25", action="store_true", help="Disable BM25 stream")
|
|
@@ -32,7 +32,7 @@ def load_config():
|
|
|
32
32
|
"""Load ~/.cortex/config.json. Exit with error if not found."""
|
|
33
33
|
if not CORTEX_CONFIG.exists():
|
|
34
34
|
print(
|
|
35
|
-
"Error: ~/.cortex/config.json not found. Run /
|
|
35
|
+
"Error: ~/.cortex/config.json not found. Run /cortexes:genesis first.",
|
|
36
36
|
file=sys.stderr,
|
|
37
37
|
)
|
|
38
38
|
sys.exit(1)
|
|
@@ -40,6 +40,10 @@ def classify_path(rel_path):
|
|
|
40
40
|
|
|
41
41
|
Returns:
|
|
42
42
|
tuple: (doc_type, category) e.g. ("note", "Nginx"), ("project", "acme-core")
|
|
43
|
+
|
|
44
|
+
`Weekly/` is no longer a Cortexes content type. A vault that still has the
|
|
45
|
+
directory keeps it on disk untouched; its pages simply classify as
|
|
46
|
+
``unknown`` and are not indexed (rebuild only scans Notes/ and Projects/).
|
|
43
47
|
"""
|
|
44
48
|
parts = Path(rel_path).parts
|
|
45
49
|
if not parts:
|
|
@@ -54,8 +58,6 @@ def classify_path(rel_path):
|
|
|
54
58
|
return "archive", ""
|
|
55
59
|
repo = parts[1] if len(parts) > 1 else ""
|
|
56
60
|
return "project", repo
|
|
57
|
-
elif top == "Weekly":
|
|
58
|
-
return "weekly", ""
|
|
59
61
|
elif top == "Raw":
|
|
60
62
|
return "raw", ""
|
|
61
63
|
return "unknown", ""
|
|
@@ -9,6 +9,8 @@ from .tokenize import tokenize
|
|
|
9
9
|
SYNONYM_GROUPS = [
|
|
10
10
|
["套件", "package"],
|
|
11
11
|
["憑證", "certificate", "cert", "tls", "ssl"],
|
|
12
|
+
# Ordinary vocabulary that can appear inside any Note — not a content
|
|
13
|
+
# type. Cortexes has no Weekly/ taxonomy (see parser.classify_path).
|
|
12
14
|
["週報", "weekly report"],
|
|
13
15
|
["登入", "login", "signin", "authentication", "auth"],
|
|
14
16
|
["記憶體", "memory", "ram"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cortex-vec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Vector store CLI for the cortex vault — hybrid BM25 + embedding retrieval over a markdown knowledge vault
|
|
5
5
|
Author: XBlueSky
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -31,7 +31,7 @@ Dynamic: license-file
|
|
|
31
31
|
|
|
32
32
|
# cortex-vec
|
|
33
33
|
|
|
34
|
-
Vector store CLI for the [
|
|
34
|
+
Vector store CLI for the [cortexes](https://github.com/XBlueSky/cortexes)
|
|
35
35
|
knowledge vault — hybrid retrieval over a plain-markdown vault, fusing a
|
|
36
36
|
persistent BM25 index with OpenAI-embedding vector search (ChromaDB) via
|
|
37
37
|
Reciprocal Rank Fusion. Handles mixed Chinese/English content.
|
|
@@ -58,11 +58,11 @@ cortex-vec search "nginx certificate" --n 5
|
|
|
58
58
|
cortex-vec status # index health: vector + BM25 entry counts
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Configuration lives in `~/.cortex/config.json` (created by the
|
|
62
|
-
plugin's `/
|
|
61
|
+
Configuration lives in `~/.cortex/config.json` (created by the Cortexes
|
|
62
|
+
plugin's `/cortexes:genesis` command). `OPENAI_API_KEY` is required for
|
|
63
63
|
embeddings; without it, `search` automatically degrades to BM25-only.
|
|
64
64
|
|
|
65
65
|
This package is the retrieval backend of the
|
|
66
|
-
[
|
|
66
|
+
[Cortexes Claude Code plugin](https://github.com/XBlueSky/cortexes) — session
|
|
67
67
|
recording, memory distillation, and indexed retrieval for Claude Code. See
|
|
68
68
|
the repository for the full documentation.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Weekly/ is no longer a Cortexes content type.
|
|
2
|
+
|
|
3
|
+
`classify_path` used to map `Weekly/` to an active `weekly` type, which is
|
|
4
|
+
what made `--type weekly` look like a real filter. Removing that branch is the
|
|
5
|
+
whole change: a leftover `Weekly/` directory stays on disk and simply falls
|
|
6
|
+
through to `unknown`, like any other unrecognised top-level folder. Indexing
|
|
7
|
+
never scanned it (rebuild walks only Notes/ and Projects/), so nobody's
|
|
8
|
+
existing index changes.
|
|
9
|
+
"""
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
|
|
14
|
+
from cortex_vec import cli
|
|
15
|
+
from cortex_vec.parser import classify_path
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_weekly_path_is_not_an_active_content_type():
|
|
19
|
+
doc_type, category = classify_path("Weekly/2026-W12.md")
|
|
20
|
+
assert doc_type != "weekly"
|
|
21
|
+
assert (doc_type, category) == ("unknown", "")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_still_recognised_types_are_untouched():
|
|
25
|
+
assert classify_path("Notes/Nginx/ssl.md") == ("note", "Nginx")
|
|
26
|
+
assert classify_path("Projects/acme/plan.md") == ("project", "acme")
|
|
27
|
+
assert classify_path("Projects/_archive/old.md") == ("archive", "")
|
|
28
|
+
assert classify_path("Raw/2026-09-01.md") == ("raw", "")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_search_help_does_not_advertise_a_weekly_filter(monkeypatch, capsys):
|
|
32
|
+
"""The real `cortex-vec search --help` text, not a copy of it."""
|
|
33
|
+
monkeypatch.setattr(sys, "argv", ["cortex-vec", "search", "--help"])
|
|
34
|
+
with pytest.raises(SystemExit):
|
|
35
|
+
cli.main()
|
|
36
|
+
out = capsys.readouterr().out.lower()
|
|
37
|
+
assert "--type" in out, out
|
|
38
|
+
assert "weekly" not in out, out
|
|
39
|
+
assert "note/project" in out, out
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|