Preserve failed/denied `ToolReturnPart.outcome` across the AG-UI adapter round-trip
- Closes #5870
The AG-UI adapter dropped a failed/denied ToolReturnPart.outcome on a dump_messages → load_messages round-trip. On dump, the ToolReturnPart branch built a ToolMessage without error=, so a failed/denied outcome was emitted as a clean success. On load, the ToolMessage case rebuilt the ToolReturnPart without reading tool_msg.error, hard-defaulting outcome='success'. After reload the model saw the tool return as successful and couldn't adapt to the failure.
This uses the AG-UI ToolMessage.error field that the spec documents for tool error state (and that the RetryPromptPart branch already emits): set error on dump for failed/denied outcomes, and map a non-None error back to outcome='failed' on load — mirroring how the Vercel AI adapter already handles this. AG-UI's single error string can't distinguish failed from denied, so both round-trip back as failed (the error state is what matters); success is unchanged and emits no error.
Added test_dump_load_roundtrip_tool_return_outcome (fails before, passes after). error= needs no version gating since it's already used by the existing RetryPromptPart dump branch.
Checklist
- Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
- No breaking changes in accordance with the version policy.
- PR title is fit for the release changelog.