omni-cortex 1.6.0__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.
Files changed (24) hide show
  1. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/.env.example +22 -0
  2. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/backfill_summaries.py +280 -0
  3. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/chat_service.py +315 -0
  4. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/database.py +1093 -0
  5. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/image_service.py +549 -0
  6. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/logging_config.py +122 -0
  7. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/main.py +1124 -0
  8. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/models.py +241 -0
  9. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/project_config.py +170 -0
  10. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/project_scanner.py +164 -0
  11. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/prompt_security.py +111 -0
  12. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/pyproject.toml +23 -0
  13. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/security.py +104 -0
  14. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/uv.lock +1110 -0
  15. omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py +104 -0
  16. omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/post_tool_use.py +335 -0
  17. omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/pre_tool_use.py +333 -0
  18. omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/stop.py +184 -0
  19. omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/subagent_stop.py +120 -0
  20. omni_cortex-1.6.0.dist-info/METADATA +319 -0
  21. omni_cortex-1.6.0.dist-info/RECORD +24 -0
  22. omni_cortex-1.6.0.dist-info/WHEEL +4 -0
  23. omni_cortex-1.6.0.dist-info/entry_points.txt +4 -0
  24. omni_cortex-1.6.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,319 @@
1
+ Metadata-Version: 2.4
2
+ Name: omni-cortex
3
+ Version: 1.6.0
4
+ Summary: Give Claude Code a perfect memory - auto-logs everything, searches smartly, and gets smarter over time
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
+ ## What Is This?
43
+
44
+ **For AI/ML experts:** A dual-layer context system with activity provenance, hybrid semantic search (FTS5 + embeddings), and temporal importance decay. Think of it as **Git + Elasticsearch + a knowledge graph for AI context**.
45
+
46
+ **For developers:** It gives Claude Code a persistent, searchable memory that auto-logs everything and gets smarter over time. Like a **senior developer's institutional knowledge**—searchable, organized, and always available.
47
+
48
+ **For everyone:** It makes your AI assistant actually remember things. No more re-explaining your project every session.
49
+
50
+ ### Why Not Just Use CLAUDE.md or Basic Memory?
51
+
52
+ | Feature | Claude Code | CLAUDE.md | Basic MCP | Omni-Cortex |
53
+ |---------|:-----------:|:---------:|:---------:|:-----------:|
54
+ | Persists between sessions | ❌ | ✅ | ✅ | ✅ |
55
+ | Auto-logs all activity | ❌ | ❌ | ❌ | ✅ |
56
+ | Hybrid search (keyword + semantic) | ❌ | ❌ | ❌ | ✅ |
57
+ | Auto-categorizes memories | ❌ | ❌ | ❌ | ✅ |
58
+ | Importance decay + access boosting | ❌ | ❌ | ❌ | ✅ |
59
+ | Session history & context | ❌ | ❌ | ❌ | ✅ |
60
+ | Memory relationships | ❌ | ❌ | ❌ | ✅ |
61
+ | Cross-project search | ❌ | ❌ | ❌ | ✅ |
62
+ | Visual dashboard | ❌ | ❌ | ❌ | ✅ |
63
+
64
+ **The difference:** Basic solutions are like sticky notes. Omni-Cortex is like having a trusted long-term employee who remembers everything, files it automatically, and hands you exactly what you need.
65
+
66
+ ## Features
67
+
68
+ - **Zero Configuration**: Works out of the box - just install and run setup
69
+ - **Dual-Layer Storage**: Activity logging (audit trail) + Knowledge store (memories)
70
+ - **18 MCP Tools**: Full-featured API for memory management, activity tracking, session continuity, and cross-project search
71
+ - **Semantic Search**: AI-powered search using sentence-transformers (optional)
72
+ - **Hybrid Search**: Combines keyword (FTS5) + semantic search for best results
73
+ - **Full-Text Search**: SQLite FTS5-powered keyword search with smart ranking
74
+ - **Auto-Categorization**: Automatic memory type detection and tag suggestions
75
+ - **Session Continuity**: "Last time you were working on..." context
76
+ - **Importance Decay**: Frequently accessed memories naturally surface
77
+ - **Auto Activity Logging**: Automatically logs all tool calls via hooks
78
+
79
+ ## Installation
80
+
81
+ ### Quick Install (Recommended)
82
+
83
+ ```bash
84
+ # Install the package
85
+ pip install omni-cortex
86
+
87
+ # Run automatic setup (configures MCP server + hooks)
88
+ omni-cortex-setup
89
+ ```
90
+
91
+ That's it! Omni Cortex will now:
92
+ - Automatically log all Claude Code tool calls
93
+ - Provide memory tools (cortex_remember, cortex_recall, etc.)
94
+ - Create a per-project database at `.omni-cortex/cortex.db`
95
+
96
+ ### With Semantic Search
97
+
98
+ For AI-powered semantic search capabilities:
99
+
100
+ ```bash
101
+ pip install omni-cortex[semantic]
102
+ omni-cortex-setup
103
+ ```
104
+
105
+ ### From Source
106
+
107
+ ```bash
108
+ git clone https://github.com/AllCytes/Omni-Cortex.git
109
+ cd omni-cortex
110
+ pip install -e ".[semantic]"
111
+ python -m omni_cortex.setup
112
+ ```
113
+
114
+ ### Manual Configuration
115
+
116
+ If you prefer manual setup, add to `~/.claude.json`:
117
+
118
+ ```json
119
+ {
120
+ "mcpServers": {
121
+ "omni-cortex": {
122
+ "command": "python",
123
+ "args": ["-m", "omni_cortex.server"]
124
+ }
125
+ }
126
+ }
127
+ ```
128
+
129
+ And optionally configure hooks in `~/.claude/settings.json` for activity logging:
130
+
131
+ ```json
132
+ {
133
+ "hooks": {
134
+ "PreToolUse": [{
135
+ "type": "command",
136
+ "command": "python -m omni_cortex.hooks.pre_tool_use"
137
+ }],
138
+ "PostToolUse": [{
139
+ "type": "command",
140
+ "command": "python -m omni_cortex.hooks.post_tool_use"
141
+ }]
142
+ }
143
+ }
144
+ ```
145
+
146
+ ### Uninstall
147
+
148
+ ```bash
149
+ omni-cortex-setup --uninstall
150
+ pip uninstall omni-cortex
151
+ ```
152
+
153
+ ## Tools
154
+
155
+ ### Memory Tools (6)
156
+
157
+ | Tool | Description |
158
+ |------|-------------|
159
+ | `cortex_remember` | Store information with auto-categorization |
160
+ | `cortex_recall` | Search memories (modes: keyword, semantic, hybrid) |
161
+ | `cortex_list_memories` | List memories with filters and pagination |
162
+ | `cortex_update_memory` | Update memory content, tags, or status |
163
+ | `cortex_forget` | Delete a memory |
164
+ | `cortex_link_memories` | Create relationships between memories |
165
+
166
+ ### Activity Tools (3)
167
+
168
+ | Tool | Description |
169
+ |------|-------------|
170
+ | `cortex_log_activity` | Manually log an activity |
171
+ | `cortex_get_activities` | Query the activity log |
172
+ | `cortex_get_timeline` | Get a chronological timeline |
173
+
174
+ ### Session Tools (3)
175
+
176
+ | Tool | Description |
177
+ |------|-------------|
178
+ | `cortex_start_session` | Start a new session with context |
179
+ | `cortex_end_session` | End session and generate summary |
180
+ | `cortex_get_session_context` | Get context from previous sessions |
181
+
182
+ ### Utility Tools (3)
183
+
184
+ | Tool | Description |
185
+ |------|-------------|
186
+ | `cortex_list_tags` | List all tags with usage counts |
187
+ | `cortex_review_memories` | Review and update memory freshness |
188
+ | `cortex_export` | Export data to markdown or JSON |
189
+
190
+ ### Global Tools (3)
191
+
192
+ | Tool | Description |
193
+ |------|-------------|
194
+ | `cortex_global_search` | Search memories across all projects |
195
+ | `cortex_global_stats` | Get global index statistics |
196
+ | `cortex_sync_to_global` | Manually sync to global index |
197
+
198
+ ## Memory Types
199
+
200
+ Memories are automatically categorized into:
201
+
202
+ - `general` - General notes and information
203
+ - `warning` - Cautions, things to avoid
204
+ - `tip` - Tips, tricks, best practices
205
+ - `config` - Configuration and settings
206
+ - `troubleshooting` - Debugging and problem-solving
207
+ - `code` - Code snippets and algorithms
208
+ - `error` - Error messages and failures
209
+ - `solution` - Solutions to problems
210
+ - `command` - CLI commands
211
+ - `concept` - Definitions and explanations
212
+ - `decision` - Architectural decisions
213
+
214
+ ## Storage
215
+
216
+ - **Per-project**: `.omni-cortex/cortex.db` in your project directory
217
+ - **Global**: `~/.omni-cortex/global.db` for cross-project search
218
+
219
+ ## Configuration
220
+
221
+ Create `.omni-cortex/config.yaml` in your project:
222
+
223
+ ```yaml
224
+ schema_version: "1.0"
225
+ embedding_enabled: true
226
+ decay_rate_per_day: 0.5
227
+ freshness_review_days: 30
228
+ auto_provide_context: true
229
+ context_depth: 3
230
+ ```
231
+
232
+ ## Web Dashboard
233
+
234
+ A visual interface for browsing, searching, and managing your memories.
235
+
236
+ ![Dashboard Preview](docs/images/dashboard-preview.png)
237
+
238
+ ### Features
239
+ - **Memory Browser**: View, search, filter, and edit memories
240
+ - **Ask AI**: Chat with your memories using Gemini
241
+ - **Real-time Updates**: WebSocket-based live sync
242
+ - **Statistics**: Memory counts, types, tags distribution
243
+ - **Project Switcher**: Switch between project databases
244
+
245
+ ### Quick Start
246
+
247
+ ```bash
248
+ # Backend (requires Python 3.10+)
249
+ cd dashboard/backend
250
+ pip install -e .
251
+ uvicorn main:app --host 0.0.0.0 --port 8765 --reload
252
+
253
+ # Frontend (requires Node.js 18+)
254
+ cd dashboard/frontend
255
+ npm install
256
+ npm run dev
257
+ ```
258
+
259
+ Open http://localhost:5173 in your browser.
260
+
261
+ ### Ask AI Setup (Optional)
262
+
263
+ To enable the "Ask AI" chat feature, set your Gemini API key:
264
+
265
+ ```bash
266
+ export GEMINI_API_KEY=your_api_key_here
267
+ ```
268
+
269
+ See [dashboard/README.md](dashboard/README.md) for full documentation.
270
+
271
+ ## Documentation
272
+
273
+ - [Tool Reference](docs/TOOLS.md) - Complete documentation for all 18 tools with examples
274
+ - [Configuration Guide](docs/CONFIGURATION.md) - Configuration options and troubleshooting
275
+ - **Teaching Materials** (PDF):
276
+ - `docs/OmniCortex_QuickStart.pdf` - 3-page quick start guide
277
+ - `docs/OmniCortex_FeatureComparison.pdf` - Comparison with basic memory MCPs
278
+ - `docs/OmniCortex_Philosophy.pdf` - Design principles and inspiration
279
+ - `docs/OmniCortex_CommandReference.pdf` - All tools with parameters
280
+
281
+ ### Regenerating PDFs
282
+
283
+ To regenerate the teaching material PDFs:
284
+
285
+ ```bash
286
+ # Requires reportlab
287
+ pip install reportlab
288
+
289
+ # Generate all 4 PDFs
290
+ python docs/create_pdfs.py
291
+ ```
292
+
293
+ The PDFs use a light theme with blue/purple/green accents. Edit `docs/create_pdfs.py` to customize colors or content.
294
+
295
+ ## Development
296
+
297
+ ```bash
298
+ # Install dev dependencies
299
+ pip install -e ".[dev]"
300
+
301
+ # Run tests
302
+ pytest
303
+
304
+ # Format code
305
+ black src tests
306
+ ruff check src tests
307
+ ```
308
+
309
+ ## Security
310
+
311
+ Omni Cortex v1.0.3 has been security reviewed:
312
+ - All SQL queries use parameterized statements
313
+ - Input validation via Pydantic models
314
+ - Model name validation prevents code injection
315
+ - YAML loading uses `safe_load()`
316
+
317
+ ## License
318
+
319
+ MIT
@@ -0,0 +1,24 @@
1
+ omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=aHaT_Q4_6mLYiYEqppAjQlQ5HqU13MUHq3g8T5agZjI,10779
2
+ omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=4WrzuJHeyafGM0e1mp3MzPot_mPL4ZBFQOZBw_dow4E,10464
3
+ omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
4
+ omni_cortex-1.6.0.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
5
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/.env.example,sha256=LenAe1A9dnwaS5UaRFPR0m_dghUcjsK-yMXZTSLIL8o,667
6
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/backfill_summaries.py,sha256=ElchfcBv4pmVr2PsePCgFlCyuvf4_jDJj_C3AmMhu7U,8973
7
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/chat_service.py,sha256=2Dfxlj0xwR47EI1jrbOF8t1E0m_OaXl-wdJoo6rqiHE,9187
8
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/database.py,sha256=Zh4Hl5I0DTZCosWIvkOYpo3Nyta8f54vnj72giDQ8vE,34942
9
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/image_service.py,sha256=wkWjUtLTLqIFgJ9WU99O8IWDvEUbv9-P8pizkV-TvhM,19059
10
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/logging_config.py,sha256=WnunFGET9zlsn9WBpVsio2zI7BiUQanE0xzAQQxIhII,3944
11
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/main.py,sha256=-sJg8GIOzX07xuUxvE6cZ6THqLblA0ObxQiOyNfvrFk,37232
12
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/models.py,sha256=Lv_qIrDNRlQNiveRwDrlhVz1QTeWD4DPpr5BBuA5Ty0,5968
13
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/project_config.py,sha256=ZxGoeRpHvN5qQyf2hRxrAZiHrPSwdQp59f0di6O1LKM,4352
14
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/project_scanner.py,sha256=lwFXS8iJbOoxf7FAyo2TjH25neaMHiJ8B3jS57XxtDI,5713
15
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/prompt_security.py,sha256=LcdZhYy1CfpSq_4BPO6lMJ15phc2ZXLUSBAnAvODVCI,3423
16
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/pyproject.toml,sha256=9pbbGQXLe1Xd06nZAtDySCHIlfMWvPaB-C6tGZR6umc,502
17
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/security.py,sha256=nQsoPE0n5dtY9ive00d33W1gL48GgK7C5Ae0BK2oW2k,3479
18
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/uv.lock,sha256=miB9zGGSirBkjDE-OZTPCnv43Yc98xuAz_Ne8vTNFHg,186004
19
+ omni_cortex-1.6.0.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py,sha256=ABXAtlhBI5vnTcwdQUS-UQcDyTn-rWZL5OKEP9YY-kU,3619
20
+ omni_cortex-1.6.0.dist-info/METADATA,sha256=ZCe4O8ZALiljSLbQA5JQ8Y6tm8XwwArKnX-v4dEK44Y,9855
21
+ omni_cortex-1.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
+ omni_cortex-1.6.0.dist-info/entry_points.txt,sha256=rohx4mFH2ffZmMb9QXPZmFf-ZGjA3jpKVDVeET-ttiM,150
23
+ omni_cortex-1.6.0.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
24
+ omni_cortex-1.6.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ omni-cortex = omni_cortex.server:main
3
+ omni-cortex-dashboard = omni_cortex.dashboard:main
4
+ omni-cortex-setup = omni_cortex.setup:main
@@ -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.