pub enum ContentBlock {
Text(TextContent),
Image(ImageContent),
Audio(AudioContent),
ResourceLink(ResourceLink),
Resource(EmbeddedResource),
Other(Value),
}Expand description
A single block of content the agent and client exchange.
The discriminator is the type field; the variants
are the five the schema names plus a passthrough
variant for blocks the typed form does not yet
model.
Variants§
Text(TextContent)
Plain text or Markdown. The schema says every agent MUST support this in prompts.
Image(ImageContent)
An image. The agent advertises support via
PromptCapabilities::image.
Audio(AudioContent)
An audio clip. The agent advertises support via
PromptCapabilities::audio.
ResourceLink(ResourceLink)
A link to an external resource. The schema says every agent MUST support this in prompts; the block is metadata, not the resource body.
Resource(EmbeddedResource)
An inline resource. The agent advertises support
via PromptCapabilities::embedded_context.
Other(Value)
A block the typed form does not model. The wire
payload is preserved verbatim in the
serde_json::Value so the bridge can forward it
losslessly.