From cd276eef7805e5a4795fa08a55fd5efa259b26e0 Mon Sep 17 00:00:00 2001 From: Erosika Date: Sun, 26 Apr 2026 11:00:32 -0400 Subject: [PATCH] compat(honcho): accept metadata kwarg on on_memory_write ABC bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- plugins/memory/honcho/__init__.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/memory/honcho/__init__.py b/plugins/memory/honcho/__init__.py index 7b82a739..2a4635ca 100644 --- a/plugins/memory/honcho/__init__.py +++ b/plugins/memory/honcho/__init__.py @@ -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: