omni-cortex 1.6.0__tar.gz → 1.7.1__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.
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/.gitignore +5 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/PKG-INFO +210 -8
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/README.md +208 -7
- omni_cortex-1.7.1/dashboard/backend/.env.example +12 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/chat_service.py +4 -2
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/image_service.py +4 -1
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/hooks/post_tool_use.py +173 -129
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/hooks/pre_tool_use.py +2 -126
- omni_cortex-1.7.1/hooks/session_utils.py +186 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/__init__.py +1 -1
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/pyproject.toml +2 -1
- omni_cortex-1.6.0/dashboard/backend/.env.example +0 -22
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/LICENSE +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/backfill_summaries.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/database.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/logging_config.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/main.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/models.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/project_config.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/project_scanner.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/prompt_security.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/pyproject.toml +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/security.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/uv.lock +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/dashboard/backend/websocket_manager.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/hooks/stop.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/hooks/subagent_stop.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/categorization/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/categorization/auto_tags.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/categorization/auto_type.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/config.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/dashboard.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/database/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/database/connection.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/database/migrations.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/database/schema.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/database/sync.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/decay/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/decay/importance.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/embeddings/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/embeddings/local.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/activity.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/agent.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/memory.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/relationship.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/models/session.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/resources/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/search/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/search/hybrid.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/search/keyword.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/search/ranking.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/search/semantic.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/server.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/setup.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/tools/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/tools/activities.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/tools/memories.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/tools/sessions.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/tools/utilities.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/utils/__init__.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/utils/formatting.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/utils/ids.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/utils/timestamps.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/omni_cortex/utils/truncation.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/scripts/check-venv.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/scripts/import_ken_memories.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/scripts/populate_session_data.py +0 -0
- {omni_cortex-1.6.0 → omni_cortex-1.7.1}/scripts/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omni-cortex
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Summary: Give Claude Code a perfect memory - auto-logs everything, searches smartly, and gets smarter over time
|
|
5
5
|
Project-URL: Homepage, https://github.com/AllCytes/Omni-Cortex
|
|
6
6
|
Project-URL: Repository, https://github.com/AllCytes/Omni-Cortex
|
|
@@ -24,6 +24,7 @@ Requires-Python: >=3.10
|
|
|
24
24
|
Requires-Dist: httpx>=0.25.0
|
|
25
25
|
Requires-Dist: mcp>=1.0.0
|
|
26
26
|
Requires-Dist: pydantic>=2.0.0
|
|
27
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
27
28
|
Requires-Dist: pyyaml>=6.0.0
|
|
28
29
|
Provides-Extra: dev
|
|
29
30
|
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
@@ -76,7 +77,179 @@ A universal memory system for Claude Code that combines activity logging with in
|
|
|
76
77
|
- **Importance Decay**: Frequently accessed memories naturally surface
|
|
77
78
|
- **Auto Activity Logging**: Automatically logs all tool calls via hooks
|
|
78
79
|
|
|
79
|
-
##
|
|
80
|
+
## Getting Started (5 Minutes)
|
|
81
|
+
|
|
82
|
+
A step-by-step guide to get Omni Cortex running on your machine.
|
|
83
|
+
|
|
84
|
+
### Prerequisites
|
|
85
|
+
|
|
86
|
+
- **Python 3.10+** - Check with `python --version`
|
|
87
|
+
- **Claude Code CLI** - The Anthropic CLI tool
|
|
88
|
+
- **pip** - Python package manager (comes with Python)
|
|
89
|
+
|
|
90
|
+
### Step 1: Install the Package
|
|
91
|
+
|
|
92
|
+
**Option A: From PyPI (Recommended for most users)**
|
|
93
|
+
```bash
|
|
94
|
+
pip install omni-cortex
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Option B: From Source (For development/contributions)**
|
|
98
|
+
```bash
|
|
99
|
+
git clone https://github.com/AllCytes/Omni-Cortex.git
|
|
100
|
+
cd Omni-Cortex
|
|
101
|
+
pip install -e ".[semantic]"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Expected output:**
|
|
105
|
+
```
|
|
106
|
+
Successfully installed omni-cortex-1.7.1
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Step 2: Run the Setup
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
omni-cortex-setup
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This automatically:
|
|
116
|
+
- Adds Omni Cortex as an MCP server in `~/.claude.json`
|
|
117
|
+
- Configures hooks in `~/.claude/settings.json` for activity logging
|
|
118
|
+
|
|
119
|
+
**Expected output:**
|
|
120
|
+
```
|
|
121
|
+
✓ MCP server configured
|
|
122
|
+
✓ Hooks configured
|
|
123
|
+
Setup complete! Restart Claude Code to activate.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Step 3: Restart Claude Code
|
|
127
|
+
|
|
128
|
+
Close and reopen your Claude Code terminal. This loads the new MCP configuration.
|
|
129
|
+
|
|
130
|
+
### Step 4: Verify It's Working
|
|
131
|
+
|
|
132
|
+
In Claude Code, try storing a memory:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Ask Claude: "Remember that the database uses SQLite for storage"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Claude should use the `cortex_remember` tool. Then verify:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Ask Claude: "What do you remember about the database?"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Claude should use `cortex_recall` and find your memory.
|
|
145
|
+
|
|
146
|
+
### Step 5: Start the Dashboard (Optional)
|
|
147
|
+
|
|
148
|
+
The web dashboard lets you browse and search memories visually.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Start the dashboard (opens http://localhost:5173)
|
|
152
|
+
omni-cortex-dashboard
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Or manually:
|
|
156
|
+
```bash
|
|
157
|
+
# Terminal 1: Backend
|
|
158
|
+
cd dashboard/backend
|
|
159
|
+
pip install -e .
|
|
160
|
+
uvicorn main:app --host 0.0.0.0 --port 8765 --reload
|
|
161
|
+
|
|
162
|
+
# Terminal 2: Frontend
|
|
163
|
+
cd dashboard/frontend
|
|
164
|
+
npm install
|
|
165
|
+
npm run dev
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Open http://localhost:5173 in your browser.
|
|
169
|
+
|
|
170
|
+
### Troubleshooting
|
|
171
|
+
|
|
172
|
+
<details>
|
|
173
|
+
<summary><b>❌ "omni-cortex-setup" command not found</b></summary>
|
|
174
|
+
|
|
175
|
+
**Cause:** pip installed to a location not in your PATH.
|
|
176
|
+
|
|
177
|
+
**Solution:**
|
|
178
|
+
```bash
|
|
179
|
+
# Find where pip installed it
|
|
180
|
+
python -m omni_cortex.setup
|
|
181
|
+
|
|
182
|
+
# Or add Python scripts to PATH (Windows)
|
|
183
|
+
# Add %APPDATA%\Python\Python3x\Scripts to your PATH
|
|
184
|
+
|
|
185
|
+
# On macOS/Linux, ensure ~/.local/bin is in PATH
|
|
186
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
187
|
+
```
|
|
188
|
+
</details>
|
|
189
|
+
|
|
190
|
+
<details>
|
|
191
|
+
<summary><b>❌ Claude doesn't see cortex_* tools</b></summary>
|
|
192
|
+
|
|
193
|
+
**Cause:** MCP server not configured or Claude Code not restarted.
|
|
194
|
+
|
|
195
|
+
**Solution:**
|
|
196
|
+
1. Check `~/.claude.json` contains the `omni-cortex` MCP server entry
|
|
197
|
+
2. Fully close and reopen Claude Code (not just the terminal)
|
|
198
|
+
3. Run `omni-cortex-setup` again if needed
|
|
199
|
+
</details>
|
|
200
|
+
|
|
201
|
+
<details>
|
|
202
|
+
<summary><b>❌ "ModuleNotFoundError: No module named 'omni_cortex'"</b></summary>
|
|
203
|
+
|
|
204
|
+
**Cause:** Python environment mismatch.
|
|
205
|
+
|
|
206
|
+
**Solution:**
|
|
207
|
+
```bash
|
|
208
|
+
# Ensure you're using the same Python that pip used
|
|
209
|
+
which python # or `where python` on Windows
|
|
210
|
+
pip show omni-cortex # Check if installed
|
|
211
|
+
|
|
212
|
+
# Reinstall if needed
|
|
213
|
+
pip install --force-reinstall omni-cortex
|
|
214
|
+
```
|
|
215
|
+
</details>
|
|
216
|
+
|
|
217
|
+
<details>
|
|
218
|
+
<summary><b>❌ Dashboard won't start</b></summary>
|
|
219
|
+
|
|
220
|
+
**Cause:** Missing dependencies or port conflict.
|
|
221
|
+
|
|
222
|
+
**Solution:**
|
|
223
|
+
```bash
|
|
224
|
+
# Install backend dependencies
|
|
225
|
+
cd dashboard/backend
|
|
226
|
+
pip install -e .
|
|
227
|
+
|
|
228
|
+
# Check if port 8765 is in use
|
|
229
|
+
# Windows: netstat -ano | findstr :8765
|
|
230
|
+
# macOS/Linux: lsof -i :8765
|
|
231
|
+
|
|
232
|
+
# Use a different port if needed
|
|
233
|
+
uvicorn main:app --port 8766
|
|
234
|
+
```
|
|
235
|
+
</details>
|
|
236
|
+
|
|
237
|
+
<details>
|
|
238
|
+
<summary><b>❌ Semantic search not working</b></summary>
|
|
239
|
+
|
|
240
|
+
**Cause:** Semantic extras not installed.
|
|
241
|
+
|
|
242
|
+
**Solution:**
|
|
243
|
+
```bash
|
|
244
|
+
pip install omni-cortex[semantic]
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
First search will download the embedding model (~100MB).
|
|
248
|
+
</details>
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Installation (Detailed)
|
|
80
253
|
|
|
81
254
|
### Quick Install (Recommended)
|
|
82
255
|
|
|
@@ -294,18 +467,47 @@ The PDFs use a light theme with blue/purple/green accents. Edit `docs/create_pdf
|
|
|
294
467
|
|
|
295
468
|
## Development
|
|
296
469
|
|
|
470
|
+
### Quick Setup (with Claude Code)
|
|
471
|
+
|
|
472
|
+
If you're using Claude Code, just run:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
/dev-setup
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
This will guide you through setting up the development environment.
|
|
479
|
+
|
|
480
|
+
### Manual Setup
|
|
481
|
+
|
|
297
482
|
```bash
|
|
298
|
-
#
|
|
299
|
-
|
|
483
|
+
# Clone and install in editable mode
|
|
484
|
+
git clone https://github.com/AllCytes/Omni-Cortex.git
|
|
485
|
+
cd Omni-Cortex
|
|
486
|
+
pip install -e .
|
|
487
|
+
|
|
488
|
+
# Install dashboard dependencies
|
|
489
|
+
cd dashboard/backend && pip install -r requirements.txt
|
|
490
|
+
cd ../frontend && npm install
|
|
491
|
+
cd ../..
|
|
300
492
|
|
|
301
|
-
#
|
|
493
|
+
# Verify installation
|
|
494
|
+
omni-cortex --help
|
|
495
|
+
omni-cortex-dashboard --help
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
**Important**: Always use `pip install -e .` (editable mode) so changes are immediately reflected without reinstalling.
|
|
499
|
+
|
|
500
|
+
### Running Tests
|
|
501
|
+
|
|
502
|
+
```bash
|
|
302
503
|
pytest
|
|
303
504
|
|
|
304
|
-
#
|
|
305
|
-
|
|
306
|
-
ruff check src tests
|
|
505
|
+
# With coverage
|
|
506
|
+
pytest --cov=src/omni_cortex
|
|
307
507
|
```
|
|
308
508
|
|
|
509
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development guidelines.
|
|
510
|
+
|
|
309
511
|
## Security
|
|
310
512
|
|
|
311
513
|
Omni Cortex v1.0.3 has been security reviewed:
|
|
@@ -39,7 +39,179 @@ A universal memory system for Claude Code that combines activity logging with in
|
|
|
39
39
|
- **Importance Decay**: Frequently accessed memories naturally surface
|
|
40
40
|
- **Auto Activity Logging**: Automatically logs all tool calls via hooks
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Getting Started (5 Minutes)
|
|
43
|
+
|
|
44
|
+
A step-by-step guide to get Omni Cortex running on your machine.
|
|
45
|
+
|
|
46
|
+
### Prerequisites
|
|
47
|
+
|
|
48
|
+
- **Python 3.10+** - Check with `python --version`
|
|
49
|
+
- **Claude Code CLI** - The Anthropic CLI tool
|
|
50
|
+
- **pip** - Python package manager (comes with Python)
|
|
51
|
+
|
|
52
|
+
### Step 1: Install the Package
|
|
53
|
+
|
|
54
|
+
**Option A: From PyPI (Recommended for most users)**
|
|
55
|
+
```bash
|
|
56
|
+
pip install omni-cortex
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Option B: From Source (For development/contributions)**
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/AllCytes/Omni-Cortex.git
|
|
62
|
+
cd Omni-Cortex
|
|
63
|
+
pip install -e ".[semantic]"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Expected output:**
|
|
67
|
+
```
|
|
68
|
+
Successfully installed omni-cortex-1.7.1
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Step 2: Run the Setup
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
omni-cortex-setup
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This automatically:
|
|
78
|
+
- Adds Omni Cortex as an MCP server in `~/.claude.json`
|
|
79
|
+
- Configures hooks in `~/.claude/settings.json` for activity logging
|
|
80
|
+
|
|
81
|
+
**Expected output:**
|
|
82
|
+
```
|
|
83
|
+
✓ MCP server configured
|
|
84
|
+
✓ Hooks configured
|
|
85
|
+
Setup complete! Restart Claude Code to activate.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 3: Restart Claude Code
|
|
89
|
+
|
|
90
|
+
Close and reopen your Claude Code terminal. This loads the new MCP configuration.
|
|
91
|
+
|
|
92
|
+
### Step 4: Verify It's Working
|
|
93
|
+
|
|
94
|
+
In Claude Code, try storing a memory:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Ask Claude: "Remember that the database uses SQLite for storage"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Claude should use the `cortex_remember` tool. Then verify:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Ask Claude: "What do you remember about the database?"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Claude should use `cortex_recall` and find your memory.
|
|
107
|
+
|
|
108
|
+
### Step 5: Start the Dashboard (Optional)
|
|
109
|
+
|
|
110
|
+
The web dashboard lets you browse and search memories visually.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Start the dashboard (opens http://localhost:5173)
|
|
114
|
+
omni-cortex-dashboard
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Or manually:
|
|
118
|
+
```bash
|
|
119
|
+
# Terminal 1: Backend
|
|
120
|
+
cd dashboard/backend
|
|
121
|
+
pip install -e .
|
|
122
|
+
uvicorn main:app --host 0.0.0.0 --port 8765 --reload
|
|
123
|
+
|
|
124
|
+
# Terminal 2: Frontend
|
|
125
|
+
cd dashboard/frontend
|
|
126
|
+
npm install
|
|
127
|
+
npm run dev
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Open http://localhost:5173 in your browser.
|
|
131
|
+
|
|
132
|
+
### Troubleshooting
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary><b>❌ "omni-cortex-setup" command not found</b></summary>
|
|
136
|
+
|
|
137
|
+
**Cause:** pip installed to a location not in your PATH.
|
|
138
|
+
|
|
139
|
+
**Solution:**
|
|
140
|
+
```bash
|
|
141
|
+
# Find where pip installed it
|
|
142
|
+
python -m omni_cortex.setup
|
|
143
|
+
|
|
144
|
+
# Or add Python scripts to PATH (Windows)
|
|
145
|
+
# Add %APPDATA%\Python\Python3x\Scripts to your PATH
|
|
146
|
+
|
|
147
|
+
# On macOS/Linux, ensure ~/.local/bin is in PATH
|
|
148
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
149
|
+
```
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
<details>
|
|
153
|
+
<summary><b>❌ Claude doesn't see cortex_* tools</b></summary>
|
|
154
|
+
|
|
155
|
+
**Cause:** MCP server not configured or Claude Code not restarted.
|
|
156
|
+
|
|
157
|
+
**Solution:**
|
|
158
|
+
1. Check `~/.claude.json` contains the `omni-cortex` MCP server entry
|
|
159
|
+
2. Fully close and reopen Claude Code (not just the terminal)
|
|
160
|
+
3. Run `omni-cortex-setup` again if needed
|
|
161
|
+
</details>
|
|
162
|
+
|
|
163
|
+
<details>
|
|
164
|
+
<summary><b>❌ "ModuleNotFoundError: No module named 'omni_cortex'"</b></summary>
|
|
165
|
+
|
|
166
|
+
**Cause:** Python environment mismatch.
|
|
167
|
+
|
|
168
|
+
**Solution:**
|
|
169
|
+
```bash
|
|
170
|
+
# Ensure you're using the same Python that pip used
|
|
171
|
+
which python # or `where python` on Windows
|
|
172
|
+
pip show omni-cortex # Check if installed
|
|
173
|
+
|
|
174
|
+
# Reinstall if needed
|
|
175
|
+
pip install --force-reinstall omni-cortex
|
|
176
|
+
```
|
|
177
|
+
</details>
|
|
178
|
+
|
|
179
|
+
<details>
|
|
180
|
+
<summary><b>❌ Dashboard won't start</b></summary>
|
|
181
|
+
|
|
182
|
+
**Cause:** Missing dependencies or port conflict.
|
|
183
|
+
|
|
184
|
+
**Solution:**
|
|
185
|
+
```bash
|
|
186
|
+
# Install backend dependencies
|
|
187
|
+
cd dashboard/backend
|
|
188
|
+
pip install -e .
|
|
189
|
+
|
|
190
|
+
# Check if port 8765 is in use
|
|
191
|
+
# Windows: netstat -ano | findstr :8765
|
|
192
|
+
# macOS/Linux: lsof -i :8765
|
|
193
|
+
|
|
194
|
+
# Use a different port if needed
|
|
195
|
+
uvicorn main:app --port 8766
|
|
196
|
+
```
|
|
197
|
+
</details>
|
|
198
|
+
|
|
199
|
+
<details>
|
|
200
|
+
<summary><b>❌ Semantic search not working</b></summary>
|
|
201
|
+
|
|
202
|
+
**Cause:** Semantic extras not installed.
|
|
203
|
+
|
|
204
|
+
**Solution:**
|
|
205
|
+
```bash
|
|
206
|
+
pip install omni-cortex[semantic]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
First search will download the embedding model (~100MB).
|
|
210
|
+
</details>
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Installation (Detailed)
|
|
43
215
|
|
|
44
216
|
### Quick Install (Recommended)
|
|
45
217
|
|
|
@@ -257,18 +429,47 @@ The PDFs use a light theme with blue/purple/green accents. Edit `docs/create_pdf
|
|
|
257
429
|
|
|
258
430
|
## Development
|
|
259
431
|
|
|
432
|
+
### Quick Setup (with Claude Code)
|
|
433
|
+
|
|
434
|
+
If you're using Claude Code, just run:
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
/dev-setup
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
This will guide you through setting up the development environment.
|
|
441
|
+
|
|
442
|
+
### Manual Setup
|
|
443
|
+
|
|
260
444
|
```bash
|
|
261
|
-
#
|
|
262
|
-
|
|
445
|
+
# Clone and install in editable mode
|
|
446
|
+
git clone https://github.com/AllCytes/Omni-Cortex.git
|
|
447
|
+
cd Omni-Cortex
|
|
448
|
+
pip install -e .
|
|
449
|
+
|
|
450
|
+
# Install dashboard dependencies
|
|
451
|
+
cd dashboard/backend && pip install -r requirements.txt
|
|
452
|
+
cd ../frontend && npm install
|
|
453
|
+
cd ../..
|
|
263
454
|
|
|
264
|
-
#
|
|
455
|
+
# Verify installation
|
|
456
|
+
omni-cortex --help
|
|
457
|
+
omni-cortex-dashboard --help
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
**Important**: Always use `pip install -e .` (editable mode) so changes are immediately reflected without reinstalling.
|
|
461
|
+
|
|
462
|
+
### Running Tests
|
|
463
|
+
|
|
464
|
+
```bash
|
|
265
465
|
pytest
|
|
266
466
|
|
|
267
|
-
#
|
|
268
|
-
|
|
269
|
-
ruff check src tests
|
|
467
|
+
# With coverage
|
|
468
|
+
pytest --cov=src/omni_cortex
|
|
270
469
|
```
|
|
271
470
|
|
|
471
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development guidelines.
|
|
472
|
+
|
|
272
473
|
## Security
|
|
273
474
|
|
|
274
475
|
Omni Cortex v1.0.3 has been security reviewed:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Dashboard Backend Environment Configuration
|
|
2
|
+
#
|
|
3
|
+
# NOTE: This file is for reference only.
|
|
4
|
+
# The dashboard now loads from the PROJECT ROOT .env file.
|
|
5
|
+
#
|
|
6
|
+
# Copy the root .env.example to .env and configure there:
|
|
7
|
+
# cp ../../.env.example ../../.env
|
|
8
|
+
#
|
|
9
|
+
# Required settings in root .env:
|
|
10
|
+
# GEMINI_API_KEY=your-api-key-here
|
|
11
|
+
#
|
|
12
|
+
# See ../../.env.example for all available options.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Chat service for natural language queries about memories using Gemini Flash."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
from pathlib import Path
|
|
4
5
|
from typing import Optional, AsyncGenerator, Any
|
|
5
6
|
|
|
6
7
|
from dotenv import load_dotenv
|
|
@@ -9,8 +10,9 @@ from database import search_memories, get_memories, create_memory
|
|
|
9
10
|
from models import FilterParams
|
|
10
11
|
from prompt_security import build_safe_prompt, xml_escape
|
|
11
12
|
|
|
12
|
-
# Load environment variables
|
|
13
|
-
|
|
13
|
+
# Load environment variables from project root
|
|
14
|
+
_project_root = Path(__file__).parent.parent.parent
|
|
15
|
+
load_dotenv(_project_root / ".env")
|
|
14
16
|
|
|
15
17
|
# Configure Gemini
|
|
16
18
|
_api_key = os.getenv("GEMINI_API_KEY") or os.getenv("GOOGLE_API_KEY")
|
|
@@ -5,6 +5,7 @@ import os
|
|
|
5
5
|
import uuid
|
|
6
6
|
from dataclasses import dataclass, field
|
|
7
7
|
from enum import Enum
|
|
8
|
+
from pathlib import Path
|
|
8
9
|
from typing import Optional
|
|
9
10
|
|
|
10
11
|
from dotenv import load_dotenv
|
|
@@ -12,7 +13,9 @@ from dotenv import load_dotenv
|
|
|
12
13
|
from database import get_memory_by_id
|
|
13
14
|
from prompt_security import xml_escape
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
# Load environment variables from project root
|
|
17
|
+
_project_root = Path(__file__).parent.parent.parent
|
|
18
|
+
load_dotenv(_project_root / ".env")
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
class ImagePreset(str, Enum):
|