Struct A2aClientConfig
pub struct A2aClientConfig {
pub enabled: bool,
pub request_timeout_secs: u64,
pub card_cache_ttl_secs: u64,
pub allow_private_hosts: bool,
pub allowed_private_hosts: Vec<String>,
pub max_response_bytes: usize,
pub peers: Vec<A2aClientPeerConfig>,
}Expand description
[a2a.client] — outbound A2A client (caller role).
Symmetric counterpart to A2aServerConfig: the server is the inbound
(responder) surface, the client is the outbound (caller) surface that
delegates tasks to remote A2A-compliant agents. Default-closed — the
four a2a_* tools register only when enabled = true, so an
unconfigured install carries no A2A outbound footprint. Peers are
declared statically under [[a2a.client.peers]]; DNS auto-discovery is
a non-goal (peers are explicitly configured, not auto-discovered).
Fields§
§enabled: boolMaster switch for the outbound A2A client. Default false: no
a2a_* tools register, no peer connections are attempted.
request_timeout_secs: u64Per-request timeout (seconds) for JSON-RPC calls to a peer, covering
message/send blocking waits. A peer that does not return a
terminal/interrupted task state within this window yields a
ToolResult::err with no retry. Default 120s.
card_cache_ttl_secs: u64Agent Card cache TTL (seconds). 0 disables caching: every
a2a_discover / a2a_send re-fetches the peer’s card. A positive
value caches the parsed card keyed by peer name to avoid repeated
well-known fetches within the window. Default 300s.
allow_private_hosts: boolAllow peers on private/loopback/link-local hosts. Default false
(secure-by-default: A2A is an outbound SSRF surface, same posture as
http_request). Set true for local/intra-net deployments where a
peer lives on 127.0.0.1 or an RFC1918 segment. Reuses the exact
helpers::domain_guard policy http_request uses — no duplicated
private-host authority.
allowed_private_hosts: Vec<String>Explicit allowlist of private hosts a peer may target even when
allow_private_hosts = false. Entries are domains, hostnames, or IPs
(with *.suffix glob support), normalized via
helpers::domain_guard::normalize_allowed_domains. Per-host pinning
without loosening the global private-host posture. Default empty.
max_response_bytes: usizeMaximum response body size (bytes) accepted from a peer for a card
fetch, JSON-RPC result, or error. A response exceeding this is
rejected before deserialization so a malicious or compromised peer
cannot exhaust daemon memory with a large or chunked body. 0 means
no limit (not recommended). Default 1MB, mirroring http_request.
peers: Vec<A2aClientPeerConfig>Declared remote peers ([[a2a.client.peers]]). Empty (with
enabled = true) registers the tools but every call fails fast
with “unknown peer” — useful for staging the config before peers
are wired.
Implementations§
Source§impl A2aClientConfig
impl A2aClientConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn init_requires_explicit_config() -> bool
pub fn init_requires_explicit_config() -> bool
True when this struct has a required leaf field that a
bare/ancestor-prefix init_defaults scaffold must not
materialize (it would fill the field with its Rust
Default, which prune_empty_leaves then strips on save,
leaving a partial sub-table that fails strict reload).
Explicitly targeting this section (or a descendant of it)
still scaffolds regardless of this flag, so the section can
be materialized for the operator to fill in.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
pub fn secret_field_terminals() -> Vec<&'static str>
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String>
pub fn get_prop(&self, name: &str) -> Result<String>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
pub fn nested_section_group(name: &str) -> Option<&'static str>
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Trait Implementations§
Source§impl Clone for A2aClientConfig
impl Clone for A2aClientConfig
Source§fn clone(&self) -> A2aClientConfig
fn clone(&self) -> A2aClientConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for A2aClientConfig
impl Debug for A2aClientConfig
Source§impl Default for A2aClientConfig
impl Default for A2aClientConfig
Source§impl<'de> Deserialize<'de> for A2aClientConfigwhere
A2aClientConfig: Default,
impl<'de> Deserialize<'de> for A2aClientConfigwhere
A2aClientConfig: Default,
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>,
Source§impl JsonSchema for A2aClientConfig
impl JsonSchema for A2aClientConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for A2aClientConfig
impl MaskSecrets for A2aClientConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &Self)
Auto Trait Implementations§
impl Freeze for A2aClientConfig
impl RefUnwindSafe for A2aClientConfig
impl Send for A2aClientConfig
impl Sync for A2aClientConfig
impl Unpin for A2aClientConfig
impl UnsafeUnpin for A2aClientConfig
impl UnwindSafe for A2aClientConfig
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>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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