Undo does not work with scripts on the Mac

see title. the result of a script cannot be undone on the Mac.

I think that the problem is actually SOME script results cannot be undone. I have some scripts that undo and others that do not.

Having no knowledge of python (but other many other programming languages) it looks to me like the ones that undo use a scriptcontext object and those that do not undo lack it.