fix(mem0-plugin): sanitize marker path, add pre-compact REST backup, fix cross-tool gaps
- Sanitize project_id in onboard marker path (tr '/:' '--') to handle slashes from env var overrides - Fire on_pre_compact.py REST backup from PreCompact hook (was only called from Stop hooks — crash before Stop = data loss) - Source _identity.sh in on_stop_codex.sh and on_stop_cursor.sh so MEM0_PROJECT_ID + API key fallback are available - Note dream --schedule is Claude Code-only (Codex/Cursor lack schedule)
This commit is contained in:
@@ -77,7 +77,8 @@ If the script reports an error, show the error message and suggest checking the
|
||||
Create a marker file so SessionStart won't re-trigger onboarding next session:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.mem0 && touch ~/.mem0/.onboarded_<active_project_id>
|
||||
_SAFE_PID=$(printf '%s' "<active_project_id>" | tr '/:' '--')
|
||||
mkdir -p ~/.mem0 && touch ~/.mem0/.onboarded_${_SAFE_PID}
|
||||
```
|
||||
|
||||
This is silent — no user-facing output needed.
|
||||
|
||||
Reference in New Issue
Block a user