pub struct A2aAgent(/* private fields */);Expand description
One remote agent, as basis hands it to mentra.
A newtype over mentra’s A2aAgentConfig rather than a type of basis’s
own, because mentra owns what an agent configuration is. It exists for
one property: a Debug that is safe wherever it is nested. mentra’s own
derives print url whole, and by the time a configuration reaches this
type basis has already expanded ${NOUS_TOKEN} into it — a query string
is where such a credential sits — while A2aConfig and A2aSource,
which hold these, derive Debug and are exactly what a host logs.
Implementations§
Source§impl A2aAgent
impl A2aAgent
pub fn new(config: A2aAgentConfig) -> Self
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The agent’s name, which is also how spawn addresses it:
@{name} <task>.
Sourcepub fn config(&self) -> &A2aAgentConfig
pub fn config(&self) -> &A2aAgentConfig
mentra’s configuration, for a caller that needs the concrete type.
pub fn into_config(self) -> A2aAgentConfig
Trait Implementations§
Source§impl Debug for A2aAgent
Hand-written for the reason the type exists. Header values need no help —
mentra types them as SecretString, which redacts itself — but url
is a plain String and goes through redaction::redacted_url. Header
names survive, because naming Authorization is what makes a
misconfiguration fixable.
impl Debug for A2aAgent
Hand-written for the reason the type exists. Header values need no help —
mentra types them as SecretString, which redacts itself — but url
is a plain String and goes through redaction::redacted_url. Header
names survive, because naming Authorization is what makes a
misconfiguration fixable.