Skip to main content

a2ui_types/v08/
capabilities.rs

1use serde::{Deserialize, Serialize};
2
3/// Client capabilities for v0.8, sent in A2A message metadata.
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct ClientCapabilities {
6    /// The URIs of catalogs supported by the client.
7    #[serde(rename = "supportedCatalogIds")]
8    pub supported_catalog_ids: Vec<String>,
9
10    /// Inline catalog definitions (only if the agent declares `acceptsInlineCatalogs: true`).
11    #[serde(rename = "inlineCatalogs", skip_serializing_if = "Option::is_none")]
12    pub inline_catalogs: Option<Vec<InlineCatalog>>,
13}
14
15/// An inline catalog definition provided by the client in v0.8.
16#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub struct InlineCatalog {
18    /// Unique identifier for this catalog.
19    #[serde(rename = "catalogId")]
20    pub catalog_id: String,
21
22    /// Component definitions, keyed by component type name.
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub components: Option<serde_json::Value>,
25
26    /// Style definitions.
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub styles: Option<serde_json::Value>,
29}