I register OnBeginCommand and OnEndCommand to intercept boolean commands (Union, Difference, Split and Intersection).
In OnBeginCommand I store the current objects in the document, and I do it the same OnEndCommand, comparing these lists you can know which are the new objects (generated by the boolean command) and which are involved in the boolean operation (objects that are not present when the command ends) but I only can reproduce commutative boolean operations (Union and Intersection) because I don’t know which objects belong to “First group” or “Second Group = objects to subtract with” Furthermore if the user set the parameter “Delete Input objects” to “yes” in boolean difference command, the comparison method doesn’t work anymore.