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:
@@ -79,7 +79,8 @@ echo ""
|
||||
|
||||
if [ "$SOURCE" = "startup" ]; then
|
||||
# First-run detection: auto-trigger onboarding for new projects
|
||||
_ONBOARD_MARKER="$HOME/.mem0/.onboarded_${MEM0_PROJECT_ID}"
|
||||
_SAFE_PID=$(printf '%s' "$MEM0_PROJECT_ID" | tr '/:' '--')
|
||||
_ONBOARD_MARKER="$HOME/.mem0/.onboarded_${_SAFE_PID}"
|
||||
if [ ! -f "$_ONBOARD_MARKER" ]; then
|
||||
cat <<'EOF'
|
||||
## Mem0 First Run — Automatic Onboarding
|
||||
|
||||
Reference in New Issue
Block a user