Return a copy of this content block projected for the negotiated protocol
version so the wire output stays in-schema for the peer. Two things are
projected:
- Block KIND: a kind whose schema postdates the negotiated version (audio
is 2025-03-26+, resource_link is 2025-06-18+, tool_use/tool_result are
2025-11-25+) is downgraded to a TextContent placeholder describing the
dropped block, rather than leaking an out-of-schema content type.
- Shared FIELDS: content-level _meta and Annotations.lastModified were
both introduced in v2025-06-18, so for any older peer (v2024-11-05 or
v2025-03-26) the _meta key is dropped and annotations.lastModified
is stripped.
Mirrors the Tool.forVersion field-stripping pattern.
Return a copy of this content block projected for the negotiated protocol version so the wire output stays in-schema for the peer. Two things are projected:
- Block KIND: a kind whose schema postdates the negotiated version (audio is 2025-03-26+, resource_link is 2025-06-18+, tool_use/tool_result are 2025-11-25+) is downgraded to a TextContent placeholder describing the dropped block, rather than leaking an out-of-schema content type. - Shared FIELDS: content-level _meta and Annotations.lastModified were both introduced in v2025-06-18, so for any older peer (v2024-11-05 or v2025-03-26) the _meta key is dropped and annotations.lastModified is stripped.
Mirrors the Tool.forVersion field-stripping pattern.