pub(crate) async fn resolve_agent_name_at_boundary(
client: &Client,
local_url: &str,
auth_key: &str,
name: &str,
) -> Result<Option<String>>Expand description
Identity M3 (spec §5): resolve a typed agent name at the boundary — the
only place a name is turned into a UID — before a tool stores it.
Ok(Some(uid)) when exactly one identified agent matches; Ok(None) when
none does, the match has no UID, or the srv predates the endpoint (the
tool then sends the name and the server records the miss). Err in two
cases, both of which fail the tool call: the name is ambiguous — the
error lists the candidates so the model can retry by uid (§5.2) — or the
resolver could not answer (a store fault, any other non-2xx, an
unreadable or unexpected response), where sending the bare name would
skip the ambiguity check. See interpret_resolve_response.