Files
lotherk 1781cdd478 session: session_search and session_list also read claude, opencode and hermes
The session plugin scanned only splinter's own sessions, so "what did we say
about X in this folder" was answered as if no other tool had ever run here.
Both tools now delegate to the foreign plugin's tools through the registry
instead of reading the three stores a second time, and stay usable without it
(fallback to splinter's own sessions).

foreign_search also promises a cwd in its schema and then threw it away
((void)only), so a search always ran over every folder. The filter is applied
for all three sources now.

Two silent losses in the opencode search: substr(data,1,20000) cut the JSON
mid-object, so 2973 messages (up to 15 MB) never parsed and were dropped, and
assistant messages carry their text in data.content[], not data.text, so
73706 of them were skipped even when short. The text is extracted in SQL now
and the whole row is read. Hermes cut its match at 400 bytes in the same way.

Test: tests/test_sessiontools.c writes a claude session into its own working
directory and expects the hit through session_search and session_list; both
fall without the delegation. tests/test_foreign.c covers a long opencode
message, an assistant message via content[], the hermes cut and the cwd
filter; every check was counter-checked against the old code. make check exit
0, check_asan.sh 45/45 clean.
2026-11-22 13:20:45 +00:00
..