Commit Graph

6 Commits

Author SHA1 Message Date
Jonny 33016bdf0a feat: assemble memory context from facts and similar summaries
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V57jSQPqwkGG8BuAXg59X5
2026-09-13 15:36:55 +02:00
Jonny 72d2bc379c feat: add remember_fact and forget_fact chat tools
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V57jSQPqwkGG8BuAXg59X5
2026-09-13 15:35:23 +02:00
Jonny 9c4ad034e5 feat: add conversation_summaries DB helpers
Add upsert_conversation_summary() and search_similar_conversation_summaries()
functions to manage conversation summaries with vector embeddings. These helpers
support cross-chat memory retrieval and background summarization tasks.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 15:00:44 +02:00
Jonny 8a7ac5aad6 fix: add explanatory comments for psycopg2 mocking in test_memory.py
Document why psycopg2 mocking is necessary in local test environment:
- psycopg2-binary cannot be installed on Python 3.14 (no Wheel)
- main.py imports psycopg2 at module level
- pg_pool only used at runtime, not during import, so mocking is safe
- Docker test environment (JARVIS_HANDOFF.md) has psycopg2-binary available

Also ensures test_memory.py matches pattern of other test files
while explaining the necessary deviation for local test execution.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 14:35:05 +02:00
Jonny 09fc20c9df chore: track pre-existing test_chat_tools.py baseline
Was never committed before. Tracking it now (unmodified) so Task 6 of
the cross-chat-memory plan, which edits this file, produces a clean
incremental diff instead of showing the whole file as new.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 12:24:01 +02:00
Jonny 18e2ff87d2 feat: add memory_facts DB helpers
Implement four async DB-helper functions for memory_facts table:
- insert_memory_fact(user_id, content) -> int
- search_memory_facts(query) -> list
- delete_memory_fact(fact_id) -> None
- get_all_memory_facts() -> list

Add test_memory.py with 4 passing tests for these helpers.
All tests pass with mocked db_query.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 12:10:23 +02:00