f2f010a350
* refactor(gateway): create module for launching async/bg agents * refactor(memory): refactor worker launch around source context & output deltas * refactor(gateway): generalize async/bg module * refactor(memory): revamp worker launching * feat(memory): add observation linking * test(memory): remove redundant test branches * fix(memory): make 'supersedes' relation directional * fix(memory): don't create empty project observation dirs * fix(memory): schedule direct observations for linking * fix(cli): wait for observation linker before shutdown * fix(memory): block arbitrary writes to /memories * fix(linker): remove `linked_by` attribute from frontmatter * refactor(linker): rename base relationship to `comlpements` * fix(cli): bump worker wait to 2m * feat(tools): catch malformed tool calls & retry * feat(status): add linking result to statusbar * fix(linker): don't launch linker when observations are disabled * fix(memory): use posix paths * fix(watcher): call abort hook on error status * fix(watcher): delete thread on failed run creation * fix(watcher): preserve url * fix(observation): record session_id, drop unused fields * fix(memory): reject unsupported worker source types * refactor(backends): shared memory backend builder * fix(scheduler): resolve linker inputs outside lock * fix(memory): dont launch workers / record observations without thread_id * feat(memory): include related observations in tool results * fix(memory): skip malformed observation frontmatter * revert(tools): drop tool error handling changes from this PR * fix(memory): serialize observation link writes * fix(memory): queue observations written by aborted workers * fix(memory): track observation linker launch handoff * fix(memory): resolve cross-project related observations * fix(status): avoid recounting reason-only link updates * fix(memory): avoid rereading file for content * fix(linker): use neutral prose for bidirectional reasons * test(memory): coverage for aborted/failed launches * test(memory): cleanup & helpers * feat(linker): add observations index hint
62 lines
1.7 KiB
Python
62 lines
1.7 KiB
Python
"""File-backed memory helpers used by EvoScientist middleware."""
|
|
|
|
from .observations import (
|
|
DEFAULT_MAX_INLINE_OBSERVATION_INDEX_CHARS,
|
|
OBSERVATION_DIR,
|
|
LinkObservationsArgs,
|
|
ReadMemoryArgs,
|
|
RecordObservationArgs,
|
|
SearchObservationsArgs,
|
|
build_observation_index_context,
|
|
build_observation_linker_index_context,
|
|
create_link_observations_tool,
|
|
create_read_memory_tool,
|
|
create_record_observation_tool,
|
|
create_search_observations_tool,
|
|
link_observation_files,
|
|
list_observation_documents,
|
|
read_observation_file,
|
|
read_observation_id_from_path,
|
|
record_observation_file,
|
|
search_observation_files,
|
|
)
|
|
from .types import (
|
|
MemoryScope,
|
|
MemorySourceType,
|
|
MemoryType,
|
|
ObservationReadResult,
|
|
ObservationRecordResult,
|
|
ObservationRelation,
|
|
ObservationSearchHit,
|
|
ObservationSearchMode,
|
|
)
|
|
|
|
__all__ = [
|
|
"DEFAULT_MAX_INLINE_OBSERVATION_INDEX_CHARS",
|
|
"OBSERVATION_DIR",
|
|
"LinkObservationsArgs",
|
|
"MemoryScope",
|
|
"MemorySourceType",
|
|
"MemoryType",
|
|
"ObservationReadResult",
|
|
"ObservationRecordResult",
|
|
"ObservationRelation",
|
|
"ObservationSearchHit",
|
|
"ObservationSearchMode",
|
|
"ReadMemoryArgs",
|
|
"RecordObservationArgs",
|
|
"SearchObservationsArgs",
|
|
"build_observation_index_context",
|
|
"build_observation_linker_index_context",
|
|
"create_link_observations_tool",
|
|
"create_read_memory_tool",
|
|
"create_record_observation_tool",
|
|
"create_search_observations_tool",
|
|
"link_observation_files",
|
|
"list_observation_documents",
|
|
"read_observation_file",
|
|
"read_observation_id_from_path",
|
|
"record_observation_file",
|
|
"search_observation_files",
|
|
]
|