fix(plugins): bug-bash fixes for Cursor, Codex, Antigravity, and a Claude.ai docs page (#6948)
This commit is contained in:
@@ -13,5 +13,5 @@
|
||||
"keywords": ["mem0", "memory", "mcp", "personalization", "semantic-search"],
|
||||
"skills": "./skills/",
|
||||
"hooks": "./hooks/cursor-hooks.json",
|
||||
"mcpServers": ".cursor-mcp.json"
|
||||
"mcpServers": "./.cursor-mcp.json"
|
||||
}
|
||||
|
||||
@@ -100,13 +100,16 @@ This points Codex at the repo's `.agents/plugins/marketplace.json`, which refere
|
||||
python3 ~/codex-plugins/mem0-source/integrations/mem0-plugin/scripts/install_codex_hooks.py
|
||||
```
|
||||
|
||||
This merges three entries into `~/.codex/hooks.json` with absolute paths pointing into your clone:
|
||||
This merges six event handlers into `~/.codex/hooks.json` with absolute paths pointing into your clone:
|
||||
|
||||
| Event | What it does |
|
||||
|-------|--------------|
|
||||
| `SessionStart` | Loads prior memories as bootstrap context |
|
||||
| `UserPromptSubmit` | Injects relevant memories into the prompt |
|
||||
| `PreToolUse` (3 handlers) | Blocks MEMORY.md writes; enforces `user_id`/`app_id` on mem0 tool calls; scans files being read for relevant memory context |
|
||||
| `PostToolUse` (2 handlers) | Tracks stats, scans bash errors for related memories |
|
||||
| `Stop` | Reminds the agent to persist learnings at turn end |
|
||||
| `PreCompact` | Stores a summary before the context is compacted |
|
||||
|
||||
Re-running the installer is idempotent (replaces the Mem0 entries rather than duplicating) and preserves any other hooks you have. To remove: `python3 .../install_codex_hooks.py --uninstall`. If you move or delete the clone directory, re-run the installer from the new location — the hooks file stores absolute paths.
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
{
|
||||
"name": "mem0-ensure-deps",
|
||||
"type": "command",
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/ensure_deps.sh 2>/dev/null || true",
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/ensure_deps.sh || true",
|
||||
"timeout": 60
|
||||
},
|
||||
{
|
||||
"name": "mem0-session-start",
|
||||
"type": "command",
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/on_session_start.sh 2>/dev/null || true"
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/on_session_start.sh || true"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
{
|
||||
"name": "mem0-user-prompt",
|
||||
"type": "command",
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/on_user_prompt.sh 2>/dev/null || true",
|
||||
"command": "ANTIGRAVITY_PLUGIN_ROOT=${extensionPath} CLAUDE_PLUGIN_ROOT=${extensionPath} bash ${extensionPath}/scripts/on_user_prompt.sh || true",
|
||||
"timeout": 8
|
||||
}
|
||||
]
|
||||
|
||||
@@ -150,7 +150,7 @@ def main() -> int:
|
||||
|
||||
print(f"Installed Mem0 hooks into {HOOKS_FILE}")
|
||||
print(f"Plugin path: {PLUGIN_ROOT}")
|
||||
print("Events: PreToolUse, SessionStart, UserPromptSubmit, PostToolUse")
|
||||
print("Events: PreToolUse, SessionStart, UserPromptSubmit, PostToolUse, Stop, PreCompact")
|
||||
|
||||
if not feature_flag_enabled():
|
||||
print_feature_flag_hint()
|
||||
|
||||
Reference in New Issue
Block a user