Apple
990e594a1d
feat: harden memory summary — fingerprint dedup, versioning, prompt injection defense
Summary hardening:
- SHA256 fingerprint of events content for deduplication
(skips LLM call when events unchanged since last summary)
- Versioned summary storage: summary:agent:channel:vN keys
- Latest pointer: summary_latest:agent:channel for fast retrieval
- Prompt injection defense: sanitize event content before LLM,
strip [SYSTEM]/[INTERNAL] markers, block "ignore instructions" patterns
- Anti-injection clause in SUMMARY_SYSTEM_PROMPT
Database fix:
- list_facts_by_agent: SQL filter by fact_prefix to only return chat_events
(prevents summary/version facts from consuming LIMIT quota)
- Fixed NULL team_id issue in UNIQUE constraint (PostgreSQL NULL != NULL)
using "__system__" sentinel for team_id in summary operations
Tested on NODE1: dedup works (same events → skipped), force=true bypasses.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 10:26:03 -08:00
..
2026-01-10 07:52:32 -08:00
2026-01-17 08:16:37 -08:00
2026-02-09 09:42:44 -08:00
2025-11-15 10:14:26 -08:00
2026-02-09 10:26:03 -08:00
2026-01-17 08:16:37 -08:00
2026-01-17 08:16:37 -08:00
2026-02-09 10:26:03 -08:00
2026-02-09 08:46:46 -08:00
2026-01-10 07:52:32 -08:00
2025-11-27 00:19:40 -08:00
2025-11-15 12:31:01 -08:00
2026-02-09 08:46:46 -08:00
2026-01-10 07:52:32 -08:00