Trash is a shell feature. Unless a program explicitly "moves to trash", deleting is final. Same for Word documents.
So, no, there is no undo in general. There could be under certain circumstances for certain things.
Everything on a ZFS/BTRFS partition with snapshots every minute/hour/day? I suppose depending on what level of access the AI has it could wipe that too but seems like there's probably a way to make this work.
I mean, I'm pretty sure it would be trivial to tell it to move files to the trash instead of deleting them. Honestly, I thought that on Windows and Mac, the default is to move files to the trash unless you explicitly say to permanently delete them.