Commit Graph

2 Commits

Author SHA1 Message Date
kartik-mem0 1daa7ece66 fix(mem0-plugin): fix 3 critical + 5 important issues from review
Critical fixes:
- C1: Pin/dream update_memory now reads content first via get_memory
  before updating, preventing metadata-only calls that wipe content
- C2: SessionStart memory count uses GET /v3/memories/?page_size=1 for
  real count from pagination envelope instead of search limit=100
- C3: on_task_completed.sh uses ${MEM0_PROJECT_ID:-unknown} to avoid
  crash when identity resolution fails under set -u

Important fixes:
- I1: session_stats.py tracks recent_ids (memory IDs + timestamps) for
  /mem0:forget undo support. Capped at 50 entries.
- I2: /mem0:health --deep mode adds memory quality analysis: duplicate
  detection, stale entry scan, contradiction flags, orphan tagging
- I3: /mem0:stats ASCII histogram for category distribution with bar
  chart, sorted by count descending
- I4: mem0-mcp skill documents access counter pattern: get_memory then
  update_memory to track which memories are actually used
- I5: on_pre_commit.py reads COMMIT_EDITMSG first (current commit),
  falls back to HEAD only if EDITMSG unavailable

Tests: 91 -> 94 (3 new for recent_ids tracking)
2026-05-21 18:46:08 +05:30
kartik-mem0 cd66050748 feat(mem0-plugin): smart retrieval, citations, pre-commit capture (Tier 7)
Smart retrieval tier:
- on_user_prompt.sh: stack-trace detection (auto-searches anti_patterns on errors)
- on_user_prompt.sh: file-aware retrieval (extracts file paths, suggests scoped search)
- on_user_prompt.sh: recency boost guidance for state-related queries
- mem0-mcp/SKILL.md: inline citation format [mem0:<8char_id>]
- on_pre_commit.py: captures staged diff as commit_context memory via REST API
2026-05-21 18:13:59 +05:30