fleet-memory/hindsight-clients/python/hindsight_client_api/models
Nicolò Boschi 90e370ef35
fix: misc fixes for observations and mental models (#209)
* fix: misc fixes for observations and mental models

* feat: improve graph retrieval for observations

- Update LinkExpansionRetriever to traverse through source_memory_ids
  for observation entity connections (avoiding data duplication)
- Remove entity link copy from world facts to observations in consolidator
- Add tests for link expansion graph retrieval
- Add directives_applied field to ReflectResult
- Include user's other changes (CLI, docs, client updates)

* fix: CI test failures

- Add mental_model_id parameter to create_mental_model function
- Fix ToolCallTrace not including reason field from ToolCall
- Improve test_link_expansion_observation_graph_retrieval to wait for consolidation with retry

* chore: reduce link expansion log verbosity

* Revert "chore: reduce link expansion log verbosity"

This reverts commit 3ce759391cead1012157785fa78fef16ef9bfe3b.

* feat: add semantic/temporal/entity links as fallback in graph retrieval

- Add fallback query for semantic, temporal, and entity links from memory_links
- Check both directions (outgoing and incoming links)
- Weight fallback results at 0.5x to prioritize entity links via unit_entities
- Fixes graph retrieval returning 0 when data has cross-cluster temporal connections

* fix: enable observations fixture for link expansion test

- Add enable_observations fixture to ensure observations are created
- Increase wait time from 10 to 30 seconds for CI reliability
2026-01-27 15:37:57 +01:00
..
__init__.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
add_background_request.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
async_operation_submit_response.py fix: improve mental model consolidation (#197) 2026-01-26 09:54:25 +01:00
background_response.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
bank_list_item.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
bank_list_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
bank_profile_response.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
bank_stats_response.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
budget.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
cancel_operation_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
chunk_data.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
chunk_include_options.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
chunk_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
consolidation_response.py fix: improve mental model consolidation (#197) 2026-01-26 09:54:25 +01:00
create_bank_request.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
create_directive_request.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
create_mental_model_request.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
create_mental_model_response.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
delete_document_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
delete_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
directive_list_response.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
directive_response.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
disposition_traits.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
document_response.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
entity_detail_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
entity_include_options.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
entity_input.py doc: changelog for 0.2.0 (and regenerate clients) (#99) 2026-01-05 12:36:29 +01:00
entity_list_item.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
entity_list_response.py fix: entities list only show 100 entities (#142) 2026-01-12 18:50:53 +01:00
entity_observation_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
entity_state_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
features_info.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
graph_data_response.py fix: ui shows only 1000 memories (#121) 2026-01-08 11:22:10 +01:00
http_validation_error.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
include_options.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
list_documents_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
list_memory_units_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
list_tags_response.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
memory_item.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
mental_model_list_response.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
mental_model_response.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
mental_model_trigger.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
operation_response.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
operation_status_response.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
operations_list_response.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
recall_request.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
recall_response.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
recall_result.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
reflect_based_on.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
reflect_directive.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
reflect_fact.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
reflect_include_options.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
reflect_llm_call.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
reflect_mental_model.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
reflect_request.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
reflect_response.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
reflect_tool_call.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
reflect_trace.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
retain_request.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
retain_response.py feat: add operation_id to retain response (#129) 2026-01-08 17:41:51 +01:00
tag_item.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
token_usage.py feat: Add per-request LLM token usage metrics (#117) 2026-01-08 10:36:58 +01:00
tool_calls_include_options.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
update_directive_request.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
update_disposition_request.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
update_mental_model_request.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
validation_error.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
validation_error_loc_inner.py feat(misc): update clients types, test coverage, improve /health endpoint and add changelog (#70) 2025-12-23 12:49:31 +01:00
version_response.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00