Okay, I found a way that seems to work, I used Occultist to check what happened when I saved a smart object via photoshop action and it was simply
{
_obj: 'save'
},
That’s it, that’s all needed to make a simple save action to the temp directory