Expand description
Agent capability registry — maps capability id → agents that implement it.
Differs from sibling crate::capabilities (which restricts what tools
an agent may call). This registry answers the inverse question: given
a capability id from the agent-bundle vocabulary
(docs/agent-bundle-spec.md — transcribe-audio, summarize, etc.),
which installed agents implement it?
Used by invoke_capability dispatch (Rust side) and by the host app’s
DynamicOptionsProvider (Swift side, via UniFFI’s list_agents).
§Selection strategy
When multiple agents advertise the same capability, [select] picks
one in this order:
- The caller-provided
hintif it names a registered agent. - Most-recently-used agent for the capability.
- First registered (insertion order).
This is intentionally simple. A scoring-based selector (latency,
quality, cost) belongs in car-inference’s adaptive router, not
here — this layer only handles “which agent” once “which model”
has already been resolved upstream.
§Persistence
In-memory only for v1. The bundle install path (when it lands) will re-register on each runtime start. Last-used timestamps don’t survive restart — pinning by hint is the durable signal.
Structs§
- Agent
Capability Registry - Maps capability id → ordered list of agents that implement it.