fn select_openable_agent<'a>(
agents: &'a [AgentDefinition],
wanted: &str,
) -> Result<&'a AgentDefinition, String>Expand description
The agent agent.open opens: a user agent (is_seeded == 0), named by
definition id or by display name (ASCII case-insensitive) — its id first,
then its name. Only when no user agent answers is a template consulted,
and then only to refuse it with TEMPLATE_NOT_OPENABLE: opening one would
launch a session that is no agent’s (spec §6.5.8, template sessions); an
agent is created from a template in the picker. A template’s id is its
lowercase name (claude), which a user agent created from it shares
case-insensitively, so templates must never be matched first.