docs: document SessionDB compat patch in README

This commit is contained in:
2026-05-25 11:05:50 -04:00
parent 141e9c17f5
commit 72c9ffaf00

View File

@@ -112,3 +112,22 @@ it uses `fallback_peer`. If that's also unset → `user-default-*` (safe).
- If the config file is missing, all resolution returns None → Honcho - If the config file is missing, all resolution returns None → Honcho
creates `user-default-*` as today. creates `user-default-*` as today.
- No data loss risk. No changes to any file in the Hermes repo. - No data loss risk. No changes to any file in the Hermes repo.
## SessionDB compatibility patch
The built-in `session_search` tool passes a `user_id` keyword argument to
`SessionDB.search_messages()` and `SessionDB.list_sessions_rich()`, but
the upstream backend methods do not accept it (they were removed in a
later release — the tool code wasn't updated to match). This causes:
```
SessionDB.search_messages() got an unexpected keyword argument 'user_id'
```
The plugin applies a monkey-patch at load time that wraps both methods
to accept (and silently drop) the `user_id` kwarg before calling the
original backend. Same zero-fork pattern as the Honcho patch.
The access-control filtering by user_id still happens in the tool code
after results are returned — this patch only removes the redundant
(and broke) passing of user_id to the DB layer.