cortex-claude 0.1.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_claude-0.1.0/.github/workflows/ci.yml +58 -0
- cortex_claude-0.1.0/.gitignore +20 -0
- cortex_claude-0.1.0/ARCHITECTURE.md +1381 -0
- cortex_claude-0.1.0/CONTRIBUTING.md +98 -0
- cortex_claude-0.1.0/LICENSE +21 -0
- cortex_claude-0.1.0/PKG-INFO +258 -0
- cortex_claude-0.1.0/README.md +223 -0
- cortex_claude-0.1.0/examples/config.json +38 -0
- cortex_claude-0.1.0/examples/mcp-global.json +12 -0
- cortex_claude-0.1.0/examples/mcp-project.json +9 -0
- cortex_claude-0.1.0/pyproject.toml +63 -0
- cortex_claude-0.1.0/scripts/benchmark.py +111 -0
- cortex_claude-0.1.0/scripts/demo.py +75 -0
- cortex_claude-0.1.0/src/cortex_claude/__init__.py +1 -0
- cortex_claude-0.1.0/src/cortex_claude/__main__.py +10 -0
- cortex_claude-0.1.0/src/cortex_claude/core/__init__.py +4 -0
- cortex_claude-0.1.0/src/cortex_claude/core/decay.py +31 -0
- cortex_claude-0.1.0/src/cortex_claude/core/engine.py +574 -0
- cortex_claude-0.1.0/src/cortex_claude/core/scope_manager.py +48 -0
- cortex_claude-0.1.0/src/cortex_claude/core/token_budget.py +35 -0
- cortex_claude-0.1.0/src/cortex_claude/embeddings/__init__.py +4 -0
- cortex_claude-0.1.0/src/cortex_claude/embeddings/engine.py +26 -0
- cortex_claude-0.1.0/src/cortex_claude/embeddings/tokenizer.py +9 -0
- cortex_claude-0.1.0/src/cortex_claude/facts/__init__.py +3 -0
- cortex_claude-0.1.0/src/cortex_claude/facts/extractor.py +71 -0
- cortex_claude-0.1.0/src/cortex_claude/facts/normalizer.py +69 -0
- cortex_claude-0.1.0/src/cortex_claude/facts/patterns.py +37 -0
- cortex_claude-0.1.0/src/cortex_claude/facts/spacy_extract.py +122 -0
- cortex_claude-0.1.0/src/cortex_claude/models/__init__.py +14 -0
- cortex_claude-0.1.0/src/cortex_claude/models/fact.py +32 -0
- cortex_claude-0.1.0/src/cortex_claude/models/memory.py +47 -0
- cortex_claude-0.1.0/src/cortex_claude/models/scope.py +18 -0
- cortex_claude-0.1.0/src/cortex_claude/pipeline/__init__.py +0 -0
- cortex_claude-0.1.0/src/cortex_claude/server/__init__.py +0 -0
- cortex_claude-0.1.0/src/cortex_claude/server/app.py +140 -0
- cortex_claude-0.1.0/src/cortex_claude/server/config.py +96 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/__init__.py +0 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/facts.py +29 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/forget.py +33 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/recall.py +35 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/save.py +23 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/scopes.py +49 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/status.py +37 -0
- cortex_claude-0.1.0/src/cortex_claude/server/tools/traverse.py +27 -0
- cortex_claude-0.1.0/src/cortex_claude/storage/__init__.py +5 -0
- cortex_claude-0.1.0/src/cortex_claude/storage/database.py +81 -0
- cortex_claude-0.1.0/src/cortex_claude/storage/fact_repo.py +117 -0
- cortex_claude-0.1.0/src/cortex_claude/storage/memory_repo.py +142 -0
- cortex_claude-0.1.0/src/cortex_claude/storage/migrations.py +117 -0
- cortex_claude-0.1.0/src/cortex_claude/summarizer/__init__.py +3 -0
- cortex_claude-0.1.0/src/cortex_claude/summarizer/extractive.py +76 -0
- cortex_claude-0.1.0/src/cortex_claude/summarizer/scoring.py +30 -0
- cortex_claude-0.1.0/tests/__init__.py +0 -0
- cortex_claude-0.1.0/tests/conftest.py +31 -0
- cortex_claude-0.1.0/tests/integration/__init__.py +0 -0
- cortex_claude-0.1.0/tests/integration/test_forget_scopes_status.py +89 -0
- cortex_claude-0.1.0/tests/integration/test_fts_and_decay.py +59 -0
- cortex_claude-0.1.0/tests/integration/test_graph_traversal.py +46 -0
- cortex_claude-0.1.0/tests/integration/test_progressive_recall.py +72 -0
- cortex_claude-0.1.0/tests/integration/test_save_recall.py +59 -0
- cortex_claude-0.1.0/tests/integration/test_storage.py +85 -0
- cortex_claude-0.1.0/tests/unit/__init__.py +0 -0
- cortex_claude-0.1.0/tests/unit/test_config.py +51 -0
- cortex_claude-0.1.0/tests/unit/test_decay.py +46 -0
- cortex_claude-0.1.0/tests/unit/test_facts.py +32 -0
- cortex_claude-0.1.0/tests/unit/test_normalizer.py +48 -0
- cortex_claude-0.1.0/tests/unit/test_scope_manager.py +63 -0
- cortex_claude-0.1.0/tests/unit/test_summarizer.py +33 -0
- cortex_claude-0.1.0/tests/unit/test_token_budget.py +27 -0
- cortex_claude-0.1.0/tests/unit/test_tokenizer.py +15 -0
- cortex_claude-0.1.0/uv.lock +2509 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
os: [ubuntu-latest, macos-latest]
|
|
19
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v5
|
|
26
|
+
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
run: uv python install ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv sync --all-extras --python ${{ matrix.python-version }}
|
|
32
|
+
|
|
33
|
+
- name: Download spaCy model
|
|
34
|
+
run: uv run python -m spacy download en_core_web_sm
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: uv run pytest tests/ -v --tb=short
|
|
38
|
+
|
|
39
|
+
publish:
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
needs: [test]
|
|
42
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
43
|
+
permissions:
|
|
44
|
+
id-token: write
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- name: Install uv
|
|
49
|
+
uses: astral-sh/setup-uv@v5
|
|
50
|
+
|
|
51
|
+
- name: Set up Python
|
|
52
|
+
run: uv python install 3.13
|
|
53
|
+
|
|
54
|
+
- name: Build package
|
|
55
|
+
run: uv build
|
|
56
|
+
|
|
57
|
+
- name: Publish to PyPI
|
|
58
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|