pub fn collapse_operator_kind(
runtime_agent: Option<OperatorKind>,
runtime_global: Option<OperatorKind>,
bp_agent: Option<OperatorKind>,
bp_global: Option<OperatorKind>,
) -> OperatorKindExpand description
The single canonical implementation of the 4-tier OperatorKind cascade
(schema doc: mlua_swarm_schema::Blueprint::default_operator_kind).
Each tier is optional; the first Some wins, top to bottom. All four
absent falls back to OperatorKind::default() (Automate).
| tier | meaning |
|---|---|
runtime_agent | per-agent override supplied at task-launch time (narrowest, most direct) |
runtime_global | the launch-time operator_kind request (session-wide) |
bp_agent | OperatorDef.kind, resolved per-agent via AgentDef.spec.operator_ref |
bp_global | Blueprint.default_operator_kind |
Consumed by Engine::resolve_operator_info (crate::core::engine), which
supplies runtime_agent / bp_agent from per-agent HashMap lookups on
OperatorSession, and runtime_global / bp_global from session-level
fields — runtime_global is OperatorSession.operator_kind verbatim
(an Option<OperatorKind>; Some(_) is always an explicit request,
including Some(Automate), and None means unspecified).