agent: Return `ToolResult` from `run` inside `Tool` (#28763)

This is just a refactor which adds no functionality.
We now return a `ToolResult` from `Tool > run(...)`. For now this just
wraps the output task in a struct. We'll use this to implement custom
rendering of tools, see #28621.

Release Notes:

- N/A
5e094553faBennet Bo Fenner committed on 4/15/2025, 2:28:09 PM· committed by GitHubparent32829d9
25 files changedLine totals unavailable