omni-cortex 1.11.1__tar.gz → 1.11.3__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.
Files changed (68) hide show
  1. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/.gitignore +1 -0
  2. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/PKG-INFO +1 -1
  3. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/main.py +2 -2
  4. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/websocket_manager.py +2 -2
  5. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/hooks/post_tool_use.py +56 -6
  6. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/__init__.py +1 -1
  7. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/pyproject.toml +1 -1
  8. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/LICENSE +0 -0
  9. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/README.md +0 -0
  10. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/.env.example +0 -0
  11. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/backfill_summaries.py +0 -0
  12. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/chat_service.py +0 -0
  13. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/database.py +0 -0
  14. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/image_service.py +0 -0
  15. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/logging_config.py +0 -0
  16. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/models.py +0 -0
  17. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/project_config.py +0 -0
  18. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/project_scanner.py +0 -0
  19. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/prompt_security.py +0 -0
  20. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/pyproject.toml +0 -0
  21. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/security.py +0 -0
  22. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/dashboard/backend/uv.lock +0 -0
  23. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/hooks/pre_tool_use.py +0 -0
  24. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/hooks/session_utils.py +0 -0
  25. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/hooks/stop.py +0 -0
  26. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/hooks/subagent_stop.py +0 -0
  27. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/categorization/__init__.py +0 -0
  28. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/categorization/auto_tags.py +0 -0
  29. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/categorization/auto_type.py +0 -0
  30. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/config.py +0 -0
  31. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/dashboard.py +0 -0
  32. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/database/__init__.py +0 -0
  33. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/database/connection.py +0 -0
  34. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/database/migrations.py +0 -0
  35. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/database/schema.py +0 -0
  36. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/database/sync.py +0 -0
  37. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/decay/__init__.py +0 -0
  38. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/decay/importance.py +0 -0
  39. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/embeddings/__init__.py +0 -0
  40. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/embeddings/local.py +0 -0
  41. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/__init__.py +0 -0
  42. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/activity.py +0 -0
  43. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/agent.py +0 -0
  44. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/memory.py +0 -0
  45. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/relationship.py +0 -0
  46. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/models/session.py +0 -0
  47. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/resources/__init__.py +0 -0
  48. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/search/__init__.py +0 -0
  49. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/search/hybrid.py +0 -0
  50. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/search/keyword.py +0 -0
  51. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/search/ranking.py +0 -0
  52. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/search/semantic.py +0 -0
  53. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/server.py +0 -0
  54. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/setup.py +0 -0
  55. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/tools/__init__.py +0 -0
  56. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/tools/activities.py +0 -0
  57. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/tools/memories.py +0 -0
  58. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/tools/sessions.py +0 -0
  59. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/tools/utilities.py +0 -0
  60. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/utils/__init__.py +0 -0
  61. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/utils/formatting.py +0 -0
  62. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/utils/ids.py +0 -0
  63. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/utils/timestamps.py +0 -0
  64. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/omni_cortex/utils/truncation.py +0 -0
  65. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/scripts/check-venv.py +0 -0
  66. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/scripts/import_ken_memories.py +0 -0
  67. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/scripts/populate_session_data.py +0 -0
  68. {omni_cortex-1.11.1 → omni_cortex-1.11.3}/scripts/setup.py +0 -0
@@ -164,3 +164,4 @@ nul
164
164
 
165
165
  # Claude Code temporary files
166
166
  tmpclaude-*-cwd
167
+ agents/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omni-cortex
3
- Version: 1.11.1
3
+ Version: 1.11.3
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
@@ -381,9 +381,9 @@ async def get_aggregate_memories(request: AggregateMemoryRequest):
381
381
  log_error(f"/api/aggregate/memories (project: {project_path})", e)
382
382
  continue
383
383
 
384
- # Sort by last_accessed or created_at
384
+ # Sort by last_accessed or created_at (convert to str to handle mixed tz-aware/naive)
385
385
  all_memories.sort(
386
- key=lambda x: x.get('last_accessed') or x.get('created_at') or '',
386
+ key=lambda x: str(x.get('last_accessed') or x.get('created_at') or ''),
387
387
  reverse=True
388
388
  )
389
389
 
@@ -41,7 +41,7 @@ class WebSocketManager:
41
41
  "event_type": event_type,
42
42
  "data": data,
43
43
  "timestamp": datetime.now().isoformat(),
44
- })
44
+ }, default=str)
45
45
 
46
46
  disconnected = []
47
47
  async with self._lock:
@@ -62,7 +62,7 @@ class WebSocketManager:
62
62
  "event_type": event_type,
63
63
  "data": data,
64
64
  "timestamp": datetime.now().isoformat(),
65
- })
65
+ }, default=str)
66
66
 
67
67
  async with self._lock:
68
68
  if client_id in self.connections:
@@ -279,16 +279,66 @@ def main():
279
279
  input_data = json.loads(raw_input)
280
280
 
281
281
  # Extract data from hook input
282
+ # Note: Claude Code uses 'tool_response' not 'tool_output'
282
283
  tool_name = input_data.get("tool_name")
283
284
  tool_input = input_data.get("tool_input", {})
284
- tool_output = input_data.get("tool_output", {})
285
+ tool_response = input_data.get("tool_response", {}) # Correct field name
285
286
  agent_id = input_data.get("agent_id")
286
287
 
287
- # Determine success/error
288
- is_error = input_data.get("is_error", False)
288
+ # Determine success/error from response content
289
+ # Claude Code doesn't send 'is_error' - we must detect from response
290
+ is_error = False
289
291
  error_message = None
290
- if is_error and isinstance(tool_output, dict):
291
- error_message = tool_output.get("error") or tool_output.get("message")
292
+
293
+ if isinstance(tool_response, dict):
294
+ # Check for explicit error field
295
+ if "error" in tool_response:
296
+ is_error = True
297
+ error_message = str(tool_response.get("error", ""))[:500]
298
+
299
+ # For Bash: check stderr or error patterns in stdout
300
+ elif tool_name == "Bash":
301
+ stderr = tool_response.get("stderr", "")
302
+ stdout = tool_response.get("stdout", "")
303
+
304
+ # Check stderr for content (excluding common non-errors)
305
+ if stderr and stderr.strip():
306
+ # Filter out common non-error stderr output
307
+ stderr_lower = stderr.lower()
308
+ non_error_patterns = ["warning:", "note:", "info:"]
309
+ if not any(p in stderr_lower for p in non_error_patterns):
310
+ is_error = True
311
+ error_message = stderr[:500]
312
+
313
+ # Check stdout for common error patterns
314
+ if not is_error and stdout:
315
+ error_patterns = [
316
+ "command not found",
317
+ "No such file or directory",
318
+ "Permission denied",
319
+ "fatal:",
320
+ "error:",
321
+ "Error:",
322
+ "FAILED",
323
+ "Cannot find",
324
+ "not recognized",
325
+ "Exit code 1",
326
+ ]
327
+ stdout_check = stdout[:1000] # Check first 1000 chars
328
+ for pattern in error_patterns:
329
+ if pattern in stdout_check:
330
+ is_error = True
331
+ error_message = f"Error pattern detected: {pattern}"
332
+ break
333
+
334
+ # For Read: check for file errors
335
+ elif tool_name == "Read":
336
+ if "error" in str(tool_response).lower():
337
+ is_error = True
338
+ error_message = "File read error"
339
+
340
+ # Legacy fallback: also check tool_output for backwards compatibility
341
+ tool_output = tool_response if tool_response else input_data.get("tool_output", {})
292
342
 
293
343
  # Skip logging our own tools to prevent recursion
294
344
  # MCP tools are named like "mcp__omni-cortex__cortex_remember"
@@ -310,7 +360,7 @@ def main():
310
360
 
311
361
  # Redact sensitive fields before logging
312
362
  safe_input = redact_sensitive_fields(tool_input) if isinstance(tool_input, dict) else tool_input
313
- safe_output = redact_sensitive_fields(tool_output) if isinstance(tool_output, dict) else tool_output
363
+ safe_output = redact_sensitive_fields(tool_response) if isinstance(tool_response, dict) else tool_response
314
364
 
315
365
  # Extract command analytics
316
366
  skill_name = None
@@ -1,3 +1,3 @@
1
1
  """Omni Cortex MCP - Universal Memory System for Claude Code."""
2
2
 
3
- __version__ = "1.11.1"
3
+ __version__ = "1.11.3"
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "omni-cortex"
7
- version = "1.11.1"
7
+ version = "1.11.3"
8
8
  description = "Give Claude Code a perfect memory - auto-logs everything, searches smartly, and gets smarter over time"
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes
File without changes