Skip to main content

synapse_a2a/
types.rs

1use serde::{Deserialize, Serialize};
2use serde_json::Value;
3
4/// Registration body from ploutonion (and future providers).
5#[derive(Debug, Clone, Deserialize, Serialize)]
6pub struct RegisterA2aAgentRequest {
7    pub id: String,
8    pub name: String,
9    pub description: String,
10    /// Absolute URL where A2A JSON-RPC is served (ploutonion agent URL).
11    pub endpoint_url: String,
12    /// Absolute URL for the agent card JSON (may be gateway or origin).
13    pub card_url: String,
14    pub tags: Vec<String>,
15    /// Full A2A agent-card JSON object (passthrough).
16    pub card: Value,
17    #[serde(default)]
18    pub ttl_seconds: Option<u64>,
19}
20
21#[derive(Debug, Clone, Deserialize, Serialize)]
22pub struct A2aCatalogEntry {
23    pub id: String,
24    pub name: String,
25    pub description: String,
26    pub card_url: String,
27    pub endpoint_url: String,
28    pub tags: Vec<String>,
29}
30
31#[derive(Debug, Clone, Deserialize, Serialize)]
32pub struct A2aCatalog {
33    pub version: String,
34    pub agents: Vec<A2aCatalogEntry>,
35}
36
37#[derive(Debug, Clone, Deserialize, Serialize)]
38pub struct A2aResolveResponse {
39    pub id: String,
40    pub endpoint_url: String,
41    pub card_url: String,
42    pub card: Value,
43}