I think app.range has all the current selection info. https://github.com/aseprite/api/blob/master/api/range.md#range
Viewing post in Feature Request: Tween only selected frames.
The selections in Aseprite can be sparse, though (with ctrl-click.) You could probably just find the first and last selected frame and then just iterator over all in that span. For cells, you could then only move them if that cell was selected maybe? I realize now that this could get complex fast because of how flexible selection is in Ase...