omni-cortex 1.0.3__py3-none-any.whl → 1.0.5__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 (18) hide show
  1. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/chat_service.py +140 -0
  2. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/database.py +729 -0
  3. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/main.py +661 -0
  4. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/models.py +140 -0
  5. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/project_scanner.py +141 -0
  6. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/pyproject.toml +23 -0
  7. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/uv.lock +697 -0
  8. omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py +82 -0
  9. {omni_cortex-1.0.3.dist-info → omni_cortex-1.0.5.dist-info}/METADATA +40 -1
  10. omni_cortex-1.0.5.dist-info/RECORD +17 -0
  11. {omni_cortex-1.0.3.dist-info → omni_cortex-1.0.5.dist-info}/entry_points.txt +1 -0
  12. omni_cortex-1.0.3.dist-info/RECORD +0 -9
  13. {omni_cortex-1.0.3.data → omni_cortex-1.0.5.data}/data/share/omni-cortex/hooks/post_tool_use.py +0 -0
  14. {omni_cortex-1.0.3.data → omni_cortex-1.0.5.data}/data/share/omni-cortex/hooks/pre_tool_use.py +0 -0
  15. {omni_cortex-1.0.3.data → omni_cortex-1.0.5.data}/data/share/omni-cortex/hooks/stop.py +0 -0
  16. {omni_cortex-1.0.3.data → omni_cortex-1.0.5.data}/data/share/omni-cortex/hooks/subagent_stop.py +0 -0
  17. {omni_cortex-1.0.3.dist-info → omni_cortex-1.0.5.dist-info}/WHEEL +0 -0
  18. {omni_cortex-1.0.3.dist-info → omni_cortex-1.0.5.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,82 @@
1
+ """WebSocket manager for real-time updates."""
2
+
3
+ import asyncio
4
+ import json
5
+ from datetime import datetime
6
+ from typing import Any
7
+ from uuid import uuid4
8
+
9
+ from fastapi import WebSocket
10
+
11
+
12
+ class WebSocketManager:
13
+ """Manages WebSocket connections and broadcasts."""
14
+
15
+ def __init__(self):
16
+ self.connections: dict[str, WebSocket] = {}
17
+ self._lock = asyncio.Lock()
18
+
19
+ async def connect(self, websocket: WebSocket, client_id: str | None = None) -> str:
20
+ """Accept a new WebSocket connection."""
21
+ await websocket.accept()
22
+ client_id = client_id or str(uuid4())
23
+ async with self._lock:
24
+ self.connections[client_id] = websocket
25
+ print(f"[WS] Client connected: {client_id} (total: {len(self.connections)})")
26
+ return client_id
27
+
28
+ async def disconnect(self, client_id: str):
29
+ """Remove a WebSocket connection."""
30
+ async with self._lock:
31
+ if client_id in self.connections:
32
+ del self.connections[client_id]
33
+ print(f"[WS] Client disconnected: {client_id} (total: {len(self.connections)})")
34
+
35
+ async def broadcast(self, event_type: str, data: dict[str, Any]):
36
+ """Broadcast a message to all connected clients."""
37
+ if not self.connections:
38
+ return
39
+
40
+ message = json.dumps({
41
+ "event_type": event_type,
42
+ "data": data,
43
+ "timestamp": datetime.now().isoformat(),
44
+ })
45
+
46
+ disconnected = []
47
+ async with self._lock:
48
+ for client_id, websocket in self.connections.items():
49
+ try:
50
+ await websocket.send_text(message)
51
+ except Exception as e:
52
+ print(f"[WS] Failed to send to {client_id}: {e}")
53
+ disconnected.append(client_id)
54
+
55
+ # Clean up disconnected clients
56
+ for client_id in disconnected:
57
+ del self.connections[client_id]
58
+
59
+ async def send_to_client(self, client_id: str, event_type: str, data: dict[str, Any]):
60
+ """Send a message to a specific client."""
61
+ message = json.dumps({
62
+ "event_type": event_type,
63
+ "data": data,
64
+ "timestamp": datetime.now().isoformat(),
65
+ })
66
+
67
+ async with self._lock:
68
+ if client_id in self.connections:
69
+ try:
70
+ await self.connections[client_id].send_text(message)
71
+ except Exception as e:
72
+ print(f"[WS] Failed to send to {client_id}: {e}")
73
+ del self.connections[client_id]
74
+
75
+ @property
76
+ def connection_count(self) -> int:
77
+ """Get the number of active connections."""
78
+ return len(self.connections)
79
+
80
+
81
+ # Global manager instance
82
+ manager = WebSocketManager()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omni-cortex
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: Universal Memory MCP for Claude Code - dual-layer activity logging and knowledge storage
5
5
  Project-URL: Homepage, https://github.com/AllCytes/Omni-Cortex
6
6
  Project-URL: Repository, https://github.com/AllCytes/Omni-Cortex
@@ -205,6 +205,45 @@ auto_provide_context: true
205
205
  context_depth: 3
206
206
  ```
207
207
 
208
+ ## Web Dashboard
209
+
210
+ A visual interface for browsing, searching, and managing your memories.
211
+
212
+ ![Dashboard Preview](docs/images/dashboard-preview.png)
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
+
208
247
  ## Documentation
209
248
 
210
249
  - [Tool Reference](docs/TOOLS.md) - Complete documentation for all 18 tools with examples
@@ -0,0 +1,17 @@
1
+ omni_cortex-1.0.5.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=zXy30KNDW6UoWP0nwq5n320r1wFa-tE6V4QuSdDzx8w,5106
2
+ omni_cortex-1.0.5.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=SlvvEKsIkolDG5Y_35VezY2e7kRpbj1GiDlBW-naj2g,4900
3
+ omni_cortex-1.0.5.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
4
+ omni_cortex-1.0.5.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
5
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/chat_service.py,sha256=xJk63Y7NW6mRCr9RekS_Xlqxbpl9WgC_D5-QIKsWgFE,3980
6
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/database.py,sha256=VRy-Eh4XsXNp-LnAG3w7Lsm5BaJzlH-OtG9tDXpV8_o,23052
7
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/main.py,sha256=KANfe-JXPJVdJvLj7vJrQIpY0YYAWoL-c1Jjpw5WuWw,20540
8
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/models.py,sha256=cVksSzga6WEsnZdASlVTqOGRnwRKATKKakueGaPz7SI,3297
9
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/project_scanner.py,sha256=6xrrgixQVihoCYvabpwd30sCO-14RrvWUjvOgWi5Tsw,4626
10
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/pyproject.toml,sha256=9pbbGQXLe1Xd06nZAtDySCHIlfMWvPaB-C6tGZR6umc,502
11
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/uv.lock,sha256=e7IMinX0BR2EcnpPwHYCdDJQDzuDzQ3D-FmPOiPKfGA,131248
12
+ omni_cortex-1.0.5.data/data/share/omni-cortex/dashboard/backend/websocket_manager.py,sha256=fv16XkRkgN4SDNwTiP_p9qFnWta9lIpAXgKbFETZ7uM,2770
13
+ omni_cortex-1.0.5.dist-info/METADATA,sha256=lrP_mU4tKChNPYqNLbKxOEuGCBPi-A4nkrUDymFUrT0,8381
14
+ omni_cortex-1.0.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
+ omni_cortex-1.0.5.dist-info/entry_points.txt,sha256=rohx4mFH2ffZmMb9QXPZmFf-ZGjA3jpKVDVeET-ttiM,150
16
+ omni_cortex-1.0.5.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
17
+ omni_cortex-1.0.5.dist-info/RECORD,,
@@ -1,3 +1,4 @@
1
1
  [console_scripts]
2
2
  omni-cortex = omni_cortex.server:main
3
+ omni-cortex-dashboard = omni_cortex.dashboard:main
3
4
  omni-cortex-setup = omni_cortex.setup:main
@@ -1,9 +0,0 @@
1
- omni_cortex-1.0.3.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=zXy30KNDW6UoWP0nwq5n320r1wFa-tE6V4QuSdDzx8w,5106
2
- omni_cortex-1.0.3.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=SlvvEKsIkolDG5Y_35VezY2e7kRpbj1GiDlBW-naj2g,4900
3
- omni_cortex-1.0.3.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
4
- omni_cortex-1.0.3.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
5
- omni_cortex-1.0.3.dist-info/METADATA,sha256=H4cNSAWpDqGwa2ZsUTQWiFCuIhgapLLP0kstQGKGV5Q,7442
6
- omni_cortex-1.0.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
- omni_cortex-1.0.3.dist-info/entry_points.txt,sha256=eRePHG-7dXr4ZAHwI1l-GY5rgVrpa1wZPL3sYBeC5QU,99
8
- omni_cortex-1.0.3.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
9
- omni_cortex-1.0.3.dist-info/RECORD,,