Mirrors unwrapToolUseResult(rawResult). Walks the tool_result
envelope: if the value is an object, surfaces the inner content
/ result / text field and the is_error / error flag.
Mirrors buildToolResultFields(isError, rawContent, base?, rawResult?).
The high-level entry that turns an arbitrary tool_result block into
the structured ToolCallUpdateFields upstream’s TUI consumes.
Mirrors createToolCall(toolUseId, name, input, parentToolUseId).
Builds the rich ToolCall envelope upstream emits when the
assistant first invokes a tool.