pub struct ExtendedAgentCard {
pub public: AgentCard,
}Expand description
The card an authenticated peer may fetch: the same agent, in more detail.
A2A’s GetExtendedAgentCard exists because the public card is read by
anyone, and some of what a peer legitimately wants to know is not for
everyone: which tools an agent may reach, what it is allowed to spend, and
what part it plays in a larger arrangement.
§Why this is a separate type
Serving the wrong card is a one-line mistake with no symptom — the response
is valid JSON either way, and the extra fields simply appear on a public
endpoint where nobody notices until somebody reads them. A distinct type
makes that a compile error instead: a handler for the public path cannot
return this, because it is not an AgentCard.
§What it still will not say
Not the model, and not the protected-field rules. Which model an agent runs on is a fact about a supply chain, and the exact fields a sink guards is a map of where to push — both are disclosure that helps an attacker more than a caller. The tool names are here because a peer deciding whether to delegate genuinely needs to know what the far side can reach.
§Where the extra detail lives
In the EXT_GOVERNANCE extension under capabilities.extensions — the
spec’s own slot for what its schema does not name — rather than as top-level
fields, which the official conformance kit rejects outright. Injected at
derive time, not at serialization, so a signature taken over the card
covers the disclosure: an extension added after signing would be exactly the
unverifiable claim the signature exists to prevent.
Fields§
§public: AgentCardThe card, with the governance extension included.
Implementations§
Source§impl ExtendedAgentCard
impl ExtendedAgentCard
Sourcepub fn tools(&self) -> Vec<ExtendedTool>
pub fn tools(&self) -> Vec<ExtendedTool>
The tools the governance extension discloses.
Sourcepub fn budget(&self) -> Option<ExtendedBudget>
pub fn budget(&self) -> Option<ExtendedBudget>
The per-run budget the governance extension discloses, when one is.
Trait Implementations§
Source§impl Clone for ExtendedAgentCard
impl Clone for ExtendedAgentCard
Source§impl Debug for ExtendedAgentCard
impl Debug for ExtendedAgentCard
Source§impl<'de> Deserialize<'de> for ExtendedAgentCard
impl<'de> Deserialize<'de> for ExtendedAgentCard
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ExtendedAgentCard
Source§impl PartialEq for ExtendedAgentCard
impl PartialEq for ExtendedAgentCard
Source§impl Serialize for ExtendedAgentCard
impl Serialize for ExtendedAgentCard
impl StructuralPartialEq for ExtendedAgentCard
Auto Trait Implementations§
impl Freeze for ExtendedAgentCard
impl RefUnwindSafe for ExtendedAgentCard
impl Send for ExtendedAgentCard
impl Sync for ExtendedAgentCard
impl Unpin for ExtendedAgentCard
impl UnsafeUnpin for ExtendedAgentCard
impl UnwindSafe for ExtendedAgentCard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more