Miniature soft robot with magnetically reprogrammable surgical functions