async fn spawn_with(
state: &AppState,
leader: Leader,
req: &SpawnAgentRequest,
operator_approved: bool,
) -> Result<SpawnAgentResult, SpawnError>Expand description
Open a worker for leader as req asks. operator_approved: the
operator made the decision beforehand (a job they created), so the user
isn’t asked; the limits and the leader’s checks still apply.