fn resolve_agent_for_s1(
state: &AppState,
agent_id: &str,
) -> Result<AgentDefinition, String>Expand description
Resolve the agent definition behind an S1-authenticated agent_id.
check_s1 authenticates a SLUG, not a UUID. RpcContext.agent_id is
“slug of the authenticated agent from bus:register”
(its doc in rpc_types/misc.rs), while agent_def_get queries db_agents
by its UUID primary key — so calling it with the authenticated value
returns None for every real caller (#3156).
Delegates to resolve_agent_definition_id, the existing resolver for
exactly this, rather than hand-rolling the lookup: it already carries the
registry-only fallback a previous review round forced in, for a live agent
that never created a local db_agents row. A fresh two-tier lookup here
would have that hole again.