mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-29 01:31:41 +00:00
compat(honcho): accept metadata kwarg on on_memory_write ABC bump
main's 6a957a74 added an optional 'metadata' kwarg to
MemoryProvider.on_memory_write so providers can distinguish tool-driven
memory writes from background-review writes. MemoryManager already
does a getfullargspec-based introspection, so the old 3-arg signature
didn't break at runtime — but it missed the origin hint entirely.
Updates HonchoMemoryProvider.on_memory_write to accept the kwarg. The
metadata isn't yet threaded into Honcho's create_conclusion payload —
that's worth its own PR once the consolidation lands and the new
metadata shape stabilises.
This commit is contained in:
parent
02ab255a0d
commit
cd276eef78
1 changed files with 14 additions and 2 deletions
|
|
@ -1090,8 +1090,20 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
)
|
||||
self._sync_thread.start()
|
||||
|
||||
def on_memory_write(self, action: str, target: str, content: str) -> None:
|
||||
"""Mirror built-in user profile writes as Honcho conclusions."""
|
||||
def on_memory_write(
|
||||
self,
|
||||
action: str,
|
||||
target: str,
|
||||
content: str,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
) -> None:
|
||||
"""Mirror built-in user profile writes as Honcho conclusions.
|
||||
|
||||
``metadata`` is accepted for compatibility with the write-origin
|
||||
work landed in main (commit 6a957a74); it's not yet threaded into
|
||||
the Honcho conclusion payload. Left as a follow-up so this PR
|
||||
stays focused on the 7-PR consolidation and its review follow-ups.
|
||||
"""
|
||||
if action != "add" or target != "user" or not content:
|
||||
return
|
||||
if self._cron_skipped:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue