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

Swadhin Biswas committed 7 months ago
b18b17b
1 parent 0f75402
commit b18b17b
6 files changed
+26 -26
▼LUA/README.md
+5-5
1
-# cortexa — Lua
1
+# contexa — Lua
2
2
3
3
Git-inspired context management for LLM agents — **COMMIT**, **BRANCH**, **MERGE**, and **CONTEXT** operations over a persistent versioned memory workspace.
4
4
7
7
## Install
8
8
9
9
```bash
10
-luarocks install cortexa
10
+luarocks install contexa
11
11
```
12
12
13
13
## Quick Start
14
14
15
15
```lua
16
-local cortexa = require("cortexa")
16
+local contexa = require("contexa")
17
17
18
18
-- Create workspace
19
-local ws = cortexa.GCCWorkspace.new("/tmp/my-project")
19
+local ws = contexa.GCCWorkspace.new("/tmp/my-project")
20
20
ws:init("Build an AI agent")
21
21
22
22
-- Log observations
35
35
36
36
-- Retrieve context
37
37
local ctx = ws:context("main", 3)
38
-print(cortexa.context_summary(ctx))
38
+print(contexa.context_summary(ctx))
39
39
```
40
40
41
41
## API
42
42
▼LUA/cortexa-0.1.1-1.rockspec → LUA/contexa-0.1.1-1.rockspec
+6-6
1
1
rockspec_format = "3.0"
2
-package = "cortexa"
2
+package = "contexa"
3
3
version = "0.1.1-1"
4
4
5
5
source = {
6
6
url = "git+https://github.com/swadhinbiswas/Cortexa.git",
7
- tag = "v0.1.1",
7
+ tag = "v0.1.2",
8
8
dir = "LUA",
9
9
}
10
10
11
11
description = {
12
12
summary = "Git-inspired context management for LLM agents",
13
13
detailed = [[
14
- Cortexa implements COMMIT, BRANCH, MERGE, and CONTEXT operations
14
+ Contexa implements COMMIT, BRANCH, MERGE, and CONTEXT operations
15
15
over a persistent versioned memory workspace for LLM agents.
16
16
Based on the paper "Git Context Controller" (arXiv:2508.00031).
17
17
]],
29
29
build = {
30
30
type = "builtin",
31
31
modules = {
32
- ["cortexa"] = "cortexa/init.lua",
33
- ["cortexa.models"] = "cortexa/models.lua",
34
- ["cortexa.workspace"] = "cortexa/workspace.lua",
32
+ ["contexa"] = "contexa/init.lua",
33
+ ["contexa.models"] = "contexa/models.lua",
34
+ ["contexa.workspace"] = "contexa/workspace.lua",
35
35
},
36
36
}
37
37
▼LUA/cortexa/init.lua → LUA/contexa/init.lua
+4-2
1
+--- contexa — package entry point.
2
+--- @module contexa
1
3
2
-local models = require("cortexa.models")
3
-local workspace = require("cortexa.workspace")
4
+local models = require("contexa.models")
5
+local workspace = require("contexa.workspace")
4
6
5
7
return {
6
8
-- Workspace
7
9
▼LUA/cortexa/models.lua → LUA/contexa/models.lua
+2-0
1
+--- contexa — Git-inspired context management for LLM agents
1
2
--- COMMIT, BRANCH, MERGE, and CONTEXT operations over a persistent
2
3
--- versioned memory workspace. Based on arXiv:2508.00031.
3
4
---
5
+--- @module contexa.models
4
6
5
7
local M = {}
6
8
7
9
▼LUA/cortexa/workspace.lua → LUA/contexa/workspace.lua
+3-1
1
+--- contexa — Git-inspired context management for LLM agents
1
2
--- GCCWorkspace: persistent versioned memory workspace.
2
3
--- Based on arXiv:2508.00031.
3
4
---
5
+--- @module contexa.workspace
4
6
5
-local models = require("cortexa.models")
7
+local models = require("contexa.models")
6
8
local lfs_ok, lfs = pcall(require, "lfs")
7
9
8
10
local W = {}
9
11
▼LUA/test.lua
+6-4
1
+--- contexa test suite
1
2
--- Run with: lua test.lua (requires luafilesystem)
2
3
4
+-- Adjust package path to find the local contexa module
3
5
package.path = "./?.lua;./?/init.lua;" .. package.path
4
6
5
-local workspace = require("cortexa.workspace")
6
-local models = require("cortexa.models")
7
+local workspace = require("contexa.workspace")
8
+local models = require("contexa.models")
7
9
8
10
local test_count = 0
9
11
local pass_count = 0
42
42
local tmp_counter = 0
43
43
local function make_tmp()
44
44
tmp_counter = tmp_counter + 1
45
- local dir = "/tmp/cortexa_lua_test_" .. os.time() .. "_" .. tmp_counter
45
+ local dir = "/tmp/contexa_lua_test_" .. os.time() .. "_" .. tmp_counter
46
46
os.execute('rm -rf "' .. dir .. '"')
47
47
os.execute('mkdir -p "' .. dir .. '"')
48
48
return dir
53
53
end
54
54
55
55
------------------------------------------------------------------------
56
-print("cortexa Lua test suite")
56
+print("contexa Lua test suite")
57
57
print(string.rep("=", 50))
58
58
59
59
------------------------------------------------------------------------
60
60