agent: Move thread history access behind AgentConnection trait (#46631)

This should move almost all access of the threadstore behind the trait,
which unlocks external agents supplying the list

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
291611e3dbBen Brandt committed on 1/12/2026, 9:42:12 PM· committed by GitHubparentf651c4c
19 files changedLine totals unavailable