pub fn acquire(ctx: &ServiceContext, name: &str) -> Result<Cap, Error>Expand description
Acquire a SEND capability to a service, by name, from the kernel’s name directory.
This is how a client finds a service it was not wired to at spawn, and how it finds the NEW
instance after one died (CLAUDE.md 14.2). It is gated: the kernel answers only for a name that
was among the send peers in this task’s spawn request, or for a task holding the broad
ACQUIRE_ANY authority (the shell, the supervisor, test probes). That is what stops name
resolution being an ambient back door around the spawn grant.
Error::NotFound covers every refusal alike: a name this task may not acquire, a name not
(yet, or currently) registered - a peer mid-restart is the common case - and a full capability
table. The SDK call returns no reason to tell them apart.