A pair of bidirectional conversion functions for transforming data between two formats.
This type is used throughout the message system to enable conversion between
provider-specific message formats (like OpenAI, Anthropic, Google, etc.) and
standardized internal content block representations. The encode function
typically converts from a standard format to a provider-specific format, while
decode converts from a provider-specific format back to the standard format.