Translates SkillKit.Types message structs to Anthropic Messages API format.
Summary
Functions
Encodes a list of native message structs into Anthropic API message format.
Encodes Tool structs into Anthropic tool format.
Functions
@spec encode_messages([SkillKit.LLM.message()]) :: [map()]
Encodes a list of native message structs into Anthropic API message format.
Consecutive ToolResult messages are grouped into a single user message with tool_result content blocks, as required by the Anthropic API.
Encodes Tool structs into Anthropic tool format.