hermes-bsd/agent
Teknium 9ca954a274
fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423)
Consolidated salvage from PRs #5301 (qaqcvc), #5339 (lance0),
#5058 and #5098 (maymuneth).

Mem0 API v2 compatibility (#5301):
- All reads use filters={user_id: ...} instead of bare user_id= kwarg
- All writes use filters with user_id + agent_id for attribution
- Response unwrapping for v2 dict format {results: [...]}
- Split _read_filters() vs _write_filters() — reads are user-scoped
  only for cross-session recall, writes include agent_id
- Preserved 'hermes-user' default (no breaking change for existing users)
- Omitted run_id scoping from #5301 — cross-session memory is Mem0's
  core value, session-scoping reads would defeat that purpose

Memory prefetch context fencing (#5339):
- Wraps prefetched memory in <memory-context> fenced blocks with system
  note marking content as recalled context, NOT user input
- Sanitizes provider output to strip fence-escape sequences, preventing
  injection where memory content breaks out of the fence
- API-call-time only — never persisted to session history

Secret redaction (#5058, #5098):
- Added prefix patterns for Groq (gsk_), Matrix (syt_), RetainDB
  (retaindb_), Hindsight (hsk-), Mem0 (mem0_), ByteRover (brv_)
2026-04-05 22:43:33 -07:00
..
__init__.py
anthropic_adapter.py
auxiliary_client.py
builtin_memory_provider.py
context_compressor.py
context_references.py
copilot_acp_client.py
credential_pool.py
display.py
insights.py
memory_manager.py fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) 2026-04-05 22:43:33 -07:00
memory_provider.py
model_metadata.py
models_dev.py feat: /model command — models.dev primary database + --provider flag (#5181) 2026-04-05 01:04:44 -07:00
prompt_builder.py feat: add GPT/Codex execution discipline guidance for tool persistence (#5414) 2026-04-05 21:51:07 -07:00
prompt_caching.py
redact.py fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) 2026-04-05 22:43:33 -07:00
skill_commands.py fix(gateway): resolve Telegram's underscored /commands to skill/plugin keys 2026-04-05 11:59:28 -07:00
skill_utils.py
smart_model_routing.py
subdirectory_hints.py feat: progressive subdirectory hint discovery (#5291) 2026-04-05 12:33:47 -07:00
title_generator.py
trajectory.py
usage_pricing.py