omni-cortex 1.0.4__py3-none-any.whl
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.
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/chat_service.py +140 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/database.py +729 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/main.py +661 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/models.py +140 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/project_scanner.py +141 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/pyproject.toml +23 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/uv.lock +697 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py +82 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/post_tool_use.py +160 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/pre_tool_use.py +159 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/stop.py +184 -0
- omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/subagent_stop.py +120 -0
- omni_cortex-1.0.4.dist-info/METADATA +295 -0
- omni_cortex-1.0.4.dist-info/RECORD +17 -0
- omni_cortex-1.0.4.dist-info/WHEEL +4 -0
- omni_cortex-1.0.4.dist-info/entry_points.txt +4 -0
- omni_cortex-1.0.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: omni-cortex
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: Universal Memory MCP for Claude Code - dual-layer activity logging and knowledge storage
|
|
5
|
+
Project-URL: Homepage, https://github.com/AllCytes/Omni-Cortex
|
|
6
|
+
Project-URL: Repository, https://github.com/AllCytes/Omni-Cortex
|
|
7
|
+
Project-URL: Issues, https://github.com/AllCytes/Omni-Cortex/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/AllCytes/Omni-Cortex#readme
|
|
9
|
+
Author: Tony
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,anthropic,claude,claude-code,llm,mcp,memory,semantic-search
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: httpx>=0.25.0
|
|
25
|
+
Requires-Dist: mcp>=1.0.0
|
|
26
|
+
Requires-Dist: pydantic>=2.0.0
|
|
27
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
33
|
+
Provides-Extra: semantic
|
|
34
|
+
Requires-Dist: numpy>=1.24.0; extra == 'semantic'
|
|
35
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == 'semantic'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# Omni Cortex MCP
|
|
39
|
+
|
|
40
|
+
A universal memory system for Claude Code that combines activity logging with intelligent knowledge storage.
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- **Zero Configuration**: Works out of the box - just install and run setup
|
|
45
|
+
- **Dual-Layer Storage**: Activity logging (audit trail) + Knowledge store (memories)
|
|
46
|
+
- **18 MCP Tools**: Full-featured API for memory management, activity tracking, session continuity, and cross-project search
|
|
47
|
+
- **Semantic Search**: AI-powered search using sentence-transformers (optional)
|
|
48
|
+
- **Hybrid Search**: Combines keyword (FTS5) + semantic search for best results
|
|
49
|
+
- **Full-Text Search**: SQLite FTS5-powered keyword search with smart ranking
|
|
50
|
+
- **Auto-Categorization**: Automatic memory type detection and tag suggestions
|
|
51
|
+
- **Session Continuity**: "Last time you were working on..." context
|
|
52
|
+
- **Importance Decay**: Frequently accessed memories naturally surface
|
|
53
|
+
- **Auto Activity Logging**: Automatically logs all tool calls via hooks
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
### Quick Install (Recommended)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install the package
|
|
61
|
+
pip install omni-cortex
|
|
62
|
+
|
|
63
|
+
# Run automatic setup (configures MCP server + hooks)
|
|
64
|
+
omni-cortex-setup
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
That's it! Omni Cortex will now:
|
|
68
|
+
- Automatically log all Claude Code tool calls
|
|
69
|
+
- Provide memory tools (cortex_remember, cortex_recall, etc.)
|
|
70
|
+
- Create a per-project database at `.omni-cortex/cortex.db`
|
|
71
|
+
|
|
72
|
+
### With Semantic Search
|
|
73
|
+
|
|
74
|
+
For AI-powered semantic search capabilities:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install omni-cortex[semantic]
|
|
78
|
+
omni-cortex-setup
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### From Source
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git clone https://github.com/AllCytes/Omni-Cortex.git
|
|
85
|
+
cd omni-cortex
|
|
86
|
+
pip install -e ".[semantic]"
|
|
87
|
+
python -m omni_cortex.setup
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Manual Configuration
|
|
91
|
+
|
|
92
|
+
If you prefer manual setup, add to `~/.claude.json`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"omni-cortex": {
|
|
98
|
+
"command": "python",
|
|
99
|
+
"args": ["-m", "omni_cortex.server"]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
And optionally configure hooks in `~/.claude/settings.json` for activity logging:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"hooks": {
|
|
110
|
+
"PreToolUse": [{
|
|
111
|
+
"type": "command",
|
|
112
|
+
"command": "python -m omni_cortex.hooks.pre_tool_use"
|
|
113
|
+
}],
|
|
114
|
+
"PostToolUse": [{
|
|
115
|
+
"type": "command",
|
|
116
|
+
"command": "python -m omni_cortex.hooks.post_tool_use"
|
|
117
|
+
}]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Uninstall
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
omni-cortex-setup --uninstall
|
|
126
|
+
pip uninstall omni-cortex
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Tools
|
|
130
|
+
|
|
131
|
+
### Memory Tools (6)
|
|
132
|
+
|
|
133
|
+
| Tool | Description |
|
|
134
|
+
|------|-------------|
|
|
135
|
+
| `cortex_remember` | Store information with auto-categorization |
|
|
136
|
+
| `cortex_recall` | Search memories (modes: keyword, semantic, hybrid) |
|
|
137
|
+
| `cortex_list_memories` | List memories with filters and pagination |
|
|
138
|
+
| `cortex_update_memory` | Update memory content, tags, or status |
|
|
139
|
+
| `cortex_forget` | Delete a memory |
|
|
140
|
+
| `cortex_link_memories` | Create relationships between memories |
|
|
141
|
+
|
|
142
|
+
### Activity Tools (3)
|
|
143
|
+
|
|
144
|
+
| Tool | Description |
|
|
145
|
+
|------|-------------|
|
|
146
|
+
| `cortex_log_activity` | Manually log an activity |
|
|
147
|
+
| `cortex_get_activities` | Query the activity log |
|
|
148
|
+
| `cortex_get_timeline` | Get a chronological timeline |
|
|
149
|
+
|
|
150
|
+
### Session Tools (3)
|
|
151
|
+
|
|
152
|
+
| Tool | Description |
|
|
153
|
+
|------|-------------|
|
|
154
|
+
| `cortex_start_session` | Start a new session with context |
|
|
155
|
+
| `cortex_end_session` | End session and generate summary |
|
|
156
|
+
| `cortex_get_session_context` | Get context from previous sessions |
|
|
157
|
+
|
|
158
|
+
### Utility Tools (3)
|
|
159
|
+
|
|
160
|
+
| Tool | Description |
|
|
161
|
+
|------|-------------|
|
|
162
|
+
| `cortex_list_tags` | List all tags with usage counts |
|
|
163
|
+
| `cortex_review_memories` | Review and update memory freshness |
|
|
164
|
+
| `cortex_export` | Export data to markdown or JSON |
|
|
165
|
+
|
|
166
|
+
### Global Tools (3)
|
|
167
|
+
|
|
168
|
+
| Tool | Description |
|
|
169
|
+
|------|-------------|
|
|
170
|
+
| `cortex_global_search` | Search memories across all projects |
|
|
171
|
+
| `cortex_global_stats` | Get global index statistics |
|
|
172
|
+
| `cortex_sync_to_global` | Manually sync to global index |
|
|
173
|
+
|
|
174
|
+
## Memory Types
|
|
175
|
+
|
|
176
|
+
Memories are automatically categorized into:
|
|
177
|
+
|
|
178
|
+
- `general` - General notes and information
|
|
179
|
+
- `warning` - Cautions, things to avoid
|
|
180
|
+
- `tip` - Tips, tricks, best practices
|
|
181
|
+
- `config` - Configuration and settings
|
|
182
|
+
- `troubleshooting` - Debugging and problem-solving
|
|
183
|
+
- `code` - Code snippets and algorithms
|
|
184
|
+
- `error` - Error messages and failures
|
|
185
|
+
- `solution` - Solutions to problems
|
|
186
|
+
- `command` - CLI commands
|
|
187
|
+
- `concept` - Definitions and explanations
|
|
188
|
+
- `decision` - Architectural decisions
|
|
189
|
+
|
|
190
|
+
## Storage
|
|
191
|
+
|
|
192
|
+
- **Per-project**: `.omni-cortex/cortex.db` in your project directory
|
|
193
|
+
- **Global**: `~/.omni-cortex/global.db` for cross-project search
|
|
194
|
+
|
|
195
|
+
## Configuration
|
|
196
|
+
|
|
197
|
+
Create `.omni-cortex/config.yaml` in your project:
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
schema_version: "1.0"
|
|
201
|
+
embedding_enabled: true
|
|
202
|
+
decay_rate_per_day: 0.5
|
|
203
|
+
freshness_review_days: 30
|
|
204
|
+
auto_provide_context: true
|
|
205
|
+
context_depth: 3
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Web Dashboard
|
|
209
|
+
|
|
210
|
+
A visual interface for browsing, searching, and managing your memories.
|
|
211
|
+
|
|
212
|
+

|
|
213
|
+
|
|
214
|
+
### Features
|
|
215
|
+
- **Memory Browser**: View, search, filter, and edit memories
|
|
216
|
+
- **Ask AI**: Chat with your memories using Gemini
|
|
217
|
+
- **Real-time Updates**: WebSocket-based live sync
|
|
218
|
+
- **Statistics**: Memory counts, types, tags distribution
|
|
219
|
+
- **Project Switcher**: Switch between project databases
|
|
220
|
+
|
|
221
|
+
### Quick Start
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Backend (requires Python 3.10+)
|
|
225
|
+
cd dashboard/backend
|
|
226
|
+
pip install -e .
|
|
227
|
+
uvicorn main:app --host 0.0.0.0 --port 8765 --reload
|
|
228
|
+
|
|
229
|
+
# Frontend (requires Node.js 18+)
|
|
230
|
+
cd dashboard/frontend
|
|
231
|
+
npm install
|
|
232
|
+
npm run dev
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Open http://localhost:5173 in your browser.
|
|
236
|
+
|
|
237
|
+
### Ask AI Setup (Optional)
|
|
238
|
+
|
|
239
|
+
To enable the "Ask AI" chat feature, set your Gemini API key:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
export GEMINI_API_KEY=your_api_key_here
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
See [dashboard/README.md](dashboard/README.md) for full documentation.
|
|
246
|
+
|
|
247
|
+
## Documentation
|
|
248
|
+
|
|
249
|
+
- [Tool Reference](docs/TOOLS.md) - Complete documentation for all 18 tools with examples
|
|
250
|
+
- [Configuration Guide](docs/CONFIGURATION.md) - Configuration options and troubleshooting
|
|
251
|
+
- **Teaching Materials** (PDF):
|
|
252
|
+
- `docs/OmniCortex_QuickStart.pdf` - 3-page quick start guide
|
|
253
|
+
- `docs/OmniCortex_FeatureComparison.pdf` - Comparison with basic memory MCPs
|
|
254
|
+
- `docs/OmniCortex_Philosophy.pdf` - Design principles and inspiration
|
|
255
|
+
- `docs/OmniCortex_CommandReference.pdf` - All tools with parameters
|
|
256
|
+
|
|
257
|
+
### Regenerating PDFs
|
|
258
|
+
|
|
259
|
+
To regenerate the teaching material PDFs:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Requires reportlab
|
|
263
|
+
pip install reportlab
|
|
264
|
+
|
|
265
|
+
# Generate all 4 PDFs
|
|
266
|
+
python docs/create_pdfs.py
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The PDFs use a light theme with blue/purple/green accents. Edit `docs/create_pdfs.py` to customize colors or content.
|
|
270
|
+
|
|
271
|
+
## Development
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Install dev dependencies
|
|
275
|
+
pip install -e ".[dev]"
|
|
276
|
+
|
|
277
|
+
# Run tests
|
|
278
|
+
pytest
|
|
279
|
+
|
|
280
|
+
# Format code
|
|
281
|
+
black src tests
|
|
282
|
+
ruff check src tests
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Security
|
|
286
|
+
|
|
287
|
+
Omni Cortex v1.0.3 has been security reviewed:
|
|
288
|
+
- All SQL queries use parameterized statements
|
|
289
|
+
- Input validation via Pydantic models
|
|
290
|
+
- Model name validation prevents code injection
|
|
291
|
+
- YAML loading uses `safe_load()`
|
|
292
|
+
|
|
293
|
+
## License
|
|
294
|
+
|
|
295
|
+
MIT
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=zXy30KNDW6UoWP0nwq5n320r1wFa-tE6V4QuSdDzx8w,5106
|
|
2
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=SlvvEKsIkolDG5Y_35VezY2e7kRpbj1GiDlBW-naj2g,4900
|
|
3
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
|
|
4
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
|
|
5
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/chat_service.py,sha256=xJk63Y7NW6mRCr9RekS_Xlqxbpl9WgC_D5-QIKsWgFE,3980
|
|
6
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/database.py,sha256=VRy-Eh4XsXNp-LnAG3w7Lsm5BaJzlH-OtG9tDXpV8_o,23052
|
|
7
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/main.py,sha256=KANfe-JXPJVdJvLj7vJrQIpY0YYAWoL-c1Jjpw5WuWw,20540
|
|
8
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/models.py,sha256=cVksSzga6WEsnZdASlVTqOGRnwRKATKKakueGaPz7SI,3297
|
|
9
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/project_scanner.py,sha256=6xrrgixQVihoCYvabpwd30sCO-14RrvWUjvOgWi5Tsw,4626
|
|
10
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/pyproject.toml,sha256=9pbbGQXLe1Xd06nZAtDySCHIlfMWvPaB-C6tGZR6umc,502
|
|
11
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/uv.lock,sha256=e7IMinX0BR2EcnpPwHYCdDJQDzuDzQ3D-FmPOiPKfGA,131248
|
|
12
|
+
omni_cortex-1.0.4.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py,sha256=fv16XkRkgN4SDNwTiP_p9qFnWta9lIpAXgKbFETZ7uM,2770
|
|
13
|
+
omni_cortex-1.0.4.dist-info/METADATA,sha256=iDOTnP5x69VuU2wY1TyF5fayS4MuA8a4_bddOQ5HdlU,8381
|
|
14
|
+
omni_cortex-1.0.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
15
|
+
omni_cortex-1.0.4.dist-info/entry_points.txt,sha256=rohx4mFH2ffZmMb9QXPZmFf-ZGjA3jpKVDVeET-ttiM,150
|
|
16
|
+
omni_cortex-1.0.4.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
|
|
17
|
+
omni_cortex-1.0.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tony Simonovsky
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|