refactor(python): rename package from 'cortexa' to 'contexa'

Swadhin Biswas committed 7 months ago
482f561
1 parent 619eb5e
commit 482f561
11 files changed
+20 -20
▼PYTHON/README.md
+11-11
1
-# cortexa
1
+# contexa
2
2
3
-[![PyPI version](https://img.shields.io/pypi/v/cortexa.svg)](https://pypi.org/project/cortexa/)
3
+[![PyPI version](https://img.shields.io/pypi/v/contexa.svg)](https://pypi.org/project/contexa/)
4
4
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
5
5
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/swadhinbiswas/Cortexa/blob/main/LICENSE)
6
6
[![GitHub](https://img.shields.io/badge/GitHub-swadhinbiswas%2FCortexa-black.svg?logo=github)](https://github.com/swadhinbiswas/Cortexa)
7
7
8
-A Python implementation of the **cortexa** framework -- Git-inspired context management for LLM agents.
8
+A Python implementation of the **contexa** framework -- Git-inspired context management for LLM agents.
9
9
10
10
Based on: [arXiv:2508.00031](https://arxiv.org/abs/2508.00031) -- *"Git Context Controller: Manage the Context of LLM-based Agents like Git"* (Junde Wu et al., 2025)
11
11
73
73
## Installation
74
74
75
75
```bash
76
-pip install cortexa
76
+pip install contexa
77
77
```
78
78
79
79
Or with [uv](https://docs.astral.sh/uv/):
80
80
81
81
```bash
82
-uv add cortexa
82
+uv add contexa
83
83
```
84
84
85
85
---
87
87
## Quick Start
88
88
89
89
```python
90
-from cortexa import GCCWorkspace
90
+from contexa import GCCWorkspace
91
91
92
92
# 1. Initialize a workspace
93
93
ws = GCCWorkspace("/path/to/project")
284
284
All models support serialization:
285
285
286
286
```python
287
-from cortexa import OTARecord, BranchMetadata
287
+from contexa import OTARecord, BranchMetadata
288
288
289
289
# OTARecord <-> dict
290
290
record = OTARecord.from_dict({"timestamp": "...", "observation": "...", ...})
302
302
303
303
## Real-World Example
304
304
305
-Here's how an autonomous coding agent might use cortexa to manage its memory while building a web application:
305
+Here's how an autonomous coding agent might use contexa to manage its memory while building a web application:
306
306
307
307
```python
308
-from cortexa import GCCWorkspace
308
+from contexa import GCCWorkspace
309
309
310
310
ws = GCCWorkspace("./my-webapp")
311
311
ws.init("Build a Flask web app with user auth, blog posts, and admin panel")
349
349
```bash
350
350
# Clone the repository
351
351
git clone https://github.com/swadhinbiswas/Cortexa.git
352
-cd cortexa
352
+cd contexa
353
353
354
354
# Install dev dependencies and run tests
355
355
uv sync
423
423
## Links
424
424
425
425
- **GitHub Repository**: [https://github.com/swadhinbiswas/Cortexa](https://github.com/swadhinbiswas/Cortexa)
426
-- **PyPI Package**: [https://pypi.org/project/cortexa/](https://pypi.org/project/cortexa/)
426
+- **PyPI Package**: [https://pypi.org/project/contexa/](https://pypi.org/project/contexa/)
427
427
- **Issue Tracker**: [https://github.com/swadhinbiswas/Cortexa/issues](https://github.com/swadhinbiswas/Cortexa/issues)
428
428
- **Original Paper**: [arXiv:2508.00031v2](https://arxiv.org/abs/2508.00031v2)
429
429
- **Author**: [Swadhin Biswas](https://github.com/swadhinbiswas)
430
430
▼PYTHON/cortexa/.gitignore → PYTHON/contexa/.gitignore
+0-0
0
0
▼PYTHON/cortexa/.python-version → PYTHON/contexa/.python-version
+0-0
0
0
▼PYTHON/cortexa/README.md → PYTHON/contexa/README.md
+0-0
0
0
▼PYTHON/cortexa/__init__.py → PYTHON/contexa/__init__.py
+1-1
1
1
"""
2
-cortexa — Python implementation of Git-Context-Controller (GCC)
2
+contexa — Python implementation of Git-Context-Controller (GCC)
3
3
4
4
Paper: "Git Context Controller: Manage the Context of LLM-based Agents like Git"
5
5
arXiv:2508.00031v2, Junde Wu et al., 2025
6
6
▼PYTHON/cortexa/main.py → PYTHON/contexa/main.py
+1-1
1
1
def main():
2
- print("Hello from cortexa!")
2
+ print("Hello from contexa!")
3
3
4
4
5
5
if __name__ == "__main__":
6
6
▼PYTHON/cortexa/models.py → PYTHON/contexa/models.py
+0-0
0
0
▼PYTHON/cortexa/workspace.py → PYTHON/contexa/workspace.py
+0-0
0
0
▼PYTHON/pyproject.toml
+2-2
1
1
[project]
2
-name = "cortexa"
2
+name = "contexa"
3
3
version = "0.1.1"
4
4
description = "Python implementation of Git-Context-Controller (GCC)"
5
5
readme = "README.md"
34
34
build-backend = "hatchling.build"
35
35
36
36
[tool.hatch.build.targets.wheel]
37
-packages = ["cortexa"]
37
+packages = ["contexa"]
38
38
39
39
[dependency-groups]
40
40
dev = [
41
41
▼PYTHON/test/test.py
+4-4
1
-"""Tests for gcc-context Python package."""
1
+"""Tests for Contexa Python package."""
2
2
3
3
import pytest
4
-from cortexa import GCCWorkspace
4
+from contexa import GCCWorkspace
5
5
6
6
7
7
@pytest.fixture
84
84
85
85
def test_branch_metadata_records_purpose(ws):
86
86
ws.branch("jwt-branch", "Test JWT auth approach")
87
- from cortexa.models import BranchMetadata
87
+ from contexa.models import BranchMetadata
88
88
89
89
meta_text = ws._read(ws._meta_path("jwt-branch"))
90
90
meta = BranchMetadata.from_yaml(meta_text)
97
97
ws.branch("to-merge", "Will be merged")
98
98
ws.commit("Branch work done")
99
99
ws.merge("to-merge", target="main")
100
- from cortexa.models import BranchMetadata
100
+ from contexa.models import BranchMetadata
101
101
102
102
meta_text = ws._read(ws._meta_path("to-merge"))
103
103
meta = BranchMetadata.from_yaml(meta_text)
104
104
▼PYTHON/uv.lock
+1-1
12
12
]
13
13
14
14
[[package]]
15
-name = "cortexa"
15
+name = "contexa"
16
16
version = "0.1.1"
17
17
source = { editable = "." }
18
18
dependencies = [
19
19