pub fn resolve_runner(
bp: &Blueprint,
agent: &AgentDef,
) -> Result<Option<Runner>, RunnerResolveError>Expand description
Resolve agent’s effective Runner against bp, in cascade order
(highest priority first):
agent.runner(inline declaration) — wins unconditionally.agent.runner_ref, resolved againstbp.runners(an unresolved name isRunnerResolveError::UnknownRunnerRef).- Legacy fallback (agent-level):
agent.profile.worker_binding = Some(variant)becomesRunner::WsClaudeCode { variant, tools: profile.tools.clone() }— the same synthesiscrate::service::task_launch::derive_worker_bindings(in themlua-swarmcore crate) performs at launch time today. bp.default_runner, resolved againstbp.runners(an unresolved name isRunnerResolveError::UnknownDefaultRunner).Ok(None)— no Runner declared through any tier.
Legacy (agent-level) beats default_runner (BP-global): tier 3
outranks tier 4, the same “agent-level wins over BP-global” rule the
ctx cascade (AgentInline > MetaRef > BpGlobal, see
mlua-swarm’s core::explain::CtxTier) already follows.
Pure and read-only: this Milestone does not wire the result into the launch / compile path (Milestone 3 scope) — it only declares the resolver.