Smith::LLM::ContentBlock
Inherits JSON::Serializable < Reference < Object
Content block can represent text, tool calls, or tool results
Constructors
The content is encrypted, so it is carried through untouched and never shown.
Instance methods
The base64 payload, and the one field that must never be written
anywhere. It is resent in full on every turn of the session, so a copy
in session.json and a second copy in the raw transcript log would grow
with each resume and be read by nobody. The session store puts the bytes
in a file of their own and leaves media_ref behind to find them again;
everything else that serializes a message gets the metadata and no blob.
The base64 payload, and the one field that must never be written
anywhere. It is resent in full on every turn of the session, so a copy
in session.json and a second copy in the raw transcript log would grow
with each resume and be read by nobody. The session store puts the bytes
in a file of their own and leaves media_ref behind to find them again;
everything else that serializes a message gets the metadata and no blob.
What to call it in a message meant for a human or for the model. The path if there was one, otherwise the media type — never nothing, because "an attachment was removed" without saying which is not information.
An attached image or PDF. media_type is what the bytes actually are,
never what the file was called, and source is the name only so a
renderer has something to print.
Anthropic's cryptographic signature over a thinking block. It must go back exactly as it came: never truncated, normalised or regenerated, or the next request is rejected. Defaulted in the declaration so sessions saved before thinking existed still deserialize.