omni-cortex 1.0.0__py3-none-any.whl → 1.0.2__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.
@@ -87,8 +87,13 @@ def truncate(text: str, max_length: int = 10000) -> str:
87
87
  def main():
88
88
  """Process PostToolUse hook."""
89
89
  try:
90
- # Read input from stdin
91
- input_data = json.load(sys.stdin)
90
+ # Read all input at once (more reliable than json.load on stdin)
91
+ raw_input = sys.stdin.read()
92
+ if not raw_input or not raw_input.strip():
93
+ print(json.dumps({}))
94
+ return
95
+
96
+ input_data = json.loads(raw_input)
92
97
 
93
98
  # Extract data from hook input
94
99
  tool_name = input_data.get("tool_name")
@@ -103,7 +108,8 @@ def main():
103
108
  error_message = tool_output.get("error") or tool_output.get("message")
104
109
 
105
110
  # Skip logging our own tools to prevent recursion
106
- if tool_name and tool_name.startswith("cortex_"):
111
+ # MCP tools are named like "mcp__omni-cortex__cortex_remember"
112
+ if tool_name and ("cortex_" in tool_name or "omni-cortex" in tool_name):
107
113
  print(json.dumps({}))
108
114
  return
109
115
 
@@ -87,8 +87,22 @@ def truncate(text: str, max_length: int = 10000) -> str:
87
87
  def main():
88
88
  """Process PreToolUse hook."""
89
89
  try:
90
- # Read input from stdin
91
- input_data = json.load(sys.stdin)
90
+ # Read input from stdin with timeout protection
91
+ import select
92
+ if sys.platform != "win32":
93
+ # Unix: use select for timeout
94
+ ready, _, _ = select.select([sys.stdin], [], [], 5.0)
95
+ if not ready:
96
+ print(json.dumps({}))
97
+ return
98
+
99
+ # Read all input at once
100
+ raw_input = sys.stdin.read()
101
+ if not raw_input or not raw_input.strip():
102
+ print(json.dumps({}))
103
+ return
104
+
105
+ input_data = json.loads(raw_input)
92
106
 
93
107
  # Extract data from hook input
94
108
  tool_name = input_data.get("tool_name")
@@ -96,7 +110,8 @@ def main():
96
110
  agent_id = input_data.get("agent_id")
97
111
 
98
112
  # Skip logging our own tools to prevent recursion
99
- if tool_name and tool_name.startswith("cortex_"):
113
+ # MCP tools are named like "mcp__omni-cortex__cortex_remember"
114
+ if tool_name and ("cortex_" in tool_name or "omni-cortex" in tool_name):
100
115
  print(json.dumps({}))
101
116
  return
102
117
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omni-cortex
3
- Version: 1.0.0
3
+ Version: 1.0.2
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
@@ -43,7 +43,7 @@ A universal memory system for Claude Code that combines activity logging with in
43
43
 
44
44
  - **Zero Configuration**: Works out of the box - just install and run setup
45
45
  - **Dual-Layer Storage**: Activity logging (audit trail) + Knowledge store (memories)
46
- - **15 MCP Tools**: Full-featured API for memory management, activity tracking, and session continuity
46
+ - **18 MCP Tools**: Full-featured API for memory management, activity tracking, session continuity, and cross-project search
47
47
  - **Semantic Search**: AI-powered search using sentence-transformers (optional)
48
48
  - **Hybrid Search**: Combines keyword (FTS5) + semantic search for best results
49
49
  - **Full-Text Search**: SQLite FTS5-powered keyword search with smart ranking
@@ -163,6 +163,14 @@ pip uninstall omni-cortex
163
163
  | `cortex_review_memories` | Review and update memory freshness |
164
164
  | `cortex_export` | Export data to markdown or JSON |
165
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
+
166
174
  ## Memory Types
167
175
 
168
176
  Memories are automatically categorized into:
@@ -197,6 +205,11 @@ auto_provide_context: true
197
205
  context_depth: 3
198
206
  ```
199
207
 
208
+ ## Documentation
209
+
210
+ - [Tool Reference](docs/TOOLS.md) - Complete documentation for all 15 tools with examples
211
+ - [Configuration Guide](docs/CONFIGURATION.md) - Configuration options and troubleshooting
212
+
200
213
  ## Development
201
214
 
202
215
  ```bash
@@ -211,6 +224,14 @@ black src tests
211
224
  ruff check src tests
212
225
  ```
213
226
 
227
+ ## Security
228
+
229
+ Omni Cortex v1.0.3 has been security reviewed:
230
+ - All SQL queries use parameterized statements
231
+ - Input validation via Pydantic models
232
+ - Model name validation prevents code injection
233
+ - YAML loading uses `safe_load()`
234
+
214
235
  ## License
215
236
 
216
237
  MIT
@@ -0,0 +1,9 @@
1
+ omni_cortex-1.0.2.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=zXy30KNDW6UoWP0nwq5n320r1wFa-tE6V4QuSdDzx8w,5106
2
+ omni_cortex-1.0.2.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=SlvvEKsIkolDG5Y_35VezY2e7kRpbj1GiDlBW-naj2g,4900
3
+ omni_cortex-1.0.2.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
4
+ omni_cortex-1.0.2.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
5
+ omni_cortex-1.0.2.dist-info/METADATA,sha256=nhw3UTk7ovR6har22SUPRSAi5owxLdnR5tfIr2010x8,6831
6
+ omni_cortex-1.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
+ omni_cortex-1.0.2.dist-info/entry_points.txt,sha256=eRePHG-7dXr4ZAHwI1l-GY5rgVrpa1wZPL3sYBeC5QU,99
8
+ omni_cortex-1.0.2.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
9
+ omni_cortex-1.0.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- omni_cortex-1.0.0.data/data/share/omni-cortex/hooks/post_tool_use.py,sha256=J9NDtoPE4MbCacAX9XYhqRXF2Agaw_SRbik8U0jlovs,4828
2
- omni_cortex-1.0.0.data/data/share/omni-cortex/hooks/pre_tool_use.py,sha256=jLkoleRSb_MJ0iy-uNwKVi8-gS49vlmLaF--riJoff0,4351
3
- omni_cortex-1.0.0.data/data/share/omni-cortex/hooks/stop.py,sha256=T1bwcmbTLj0gzjrVvFBT1zB6wff4J2YkYBAY-ZxZI5g,5336
4
- omni_cortex-1.0.0.data/data/share/omni-cortex/hooks/subagent_stop.py,sha256=V9HQSFGNOfkg8ZCstPEy4h5V8BP4AbrVr8teFzN1kNk,3314
5
- omni_cortex-1.0.0.dist-info/METADATA,sha256=Q3zKLHnNw0YmcG9Kd2XnMjlKtEYcPFauZVJr931Nfus,6130
6
- omni_cortex-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
- omni_cortex-1.0.0.dist-info/entry_points.txt,sha256=eRePHG-7dXr4ZAHwI1l-GY5rgVrpa1wZPL3sYBeC5QU,99
8
- omni_cortex-1.0.0.dist-info/licenses/LICENSE,sha256=oG_397owMmi-Umxp5sYocJ6RPohp9_bDNnnEu9OUphg,1072
9
- omni_cortex-1.0.0.dist-info/RECORD,,