A structured data segment within a message or artifact.
Wire shape: {"kind": "data", "data": <object>, "metadata": <map?>}.
Checkpoint-in-envelope convention
DataPart is the carrier for the "checkpoint-in-envelope" pattern. A worker
(or caller) stashes opaque resumable state here and tags the part via
metadata so the broker can route it back to the producer only:
%A2aEngine.Types.DataPart{
data: %{ ... serialized worker/session state ... },
metadata: %{
"type" => "checkpoint",
"owner" => "my-worker",
"session" => "sess_abc123"
}
}The A2A spec treats data and metadata as opaque; the convention lives
in application code. See A2aEngine moduledoc.