Fix code review issues and improve code quality #1

Merged
Pakobbix merged 3 commits from fixes/code-review-issues into main 2026-04-10 11:53:10 +00:00

3 Commits

Author SHA1 Message Date
ARIA 93876a2653 Refactor: improve thread safety and code organization
- Add dedicated _breaker_lock for thread-safe circuit breaker state access
- Extract _format_search_results() helper to eliminate DRY violation
- Document unused session_id parameters for API compatibility
2026-04-10 13:50:19 +02:00
ARIA b70402ed30 Fix missing agent_id in sync_turn()
The sync_turn() method was not passing agent_id to client.add(),
causing inconsistent memory scoping compared to mem0_conclude.
2026-04-10 13:47:08 +02:00
ARIA 2f98f63ecd Fix code review issues
- Add agent_id parameter to client.add() and use it in mem0_conclude
- Fix inconsistent field access in queue_prefetch_and_get (check both text and memory)
- Remove unused _read_filters() and _write_filters() methods
- Mark prefetch() query parameter as deprecated (was unused)
2026-04-10 13:45:34 +02:00