executor: implement `autoAttach` from loopback

/to @raymondfeng please review
/cc @ritch