So, finally here is my attempt at utilizing TF for this as so far it has been pretty mechanical. Assuming that the vast majority of forging is done by NXT nodes with a full set of external plugins, then within a reasonable number of blocks, the plugin will get invoked. We can use TF to see how many blocks we need to wait for the first forged block that is on a node capable of executing the external plugin! This is SUPER useful, since otherwise we would need to try to invoke the plugin, wait for error and then retry. MUCH better if we minimized errors in the first place.
Don't know what you mean by: 'we invoke the plugin'. The node that is capable of executing the plugin executes it.
The execution of a script has to be done multiple times in order to verify its output.
The script is validated by all the nodes, but the forging node needs to "send the email". We don't want to have multiple copies of the same email, even though it is not fatal. However, some plugins will have functionality that you wouldnt want to do more than once. TF allows all the nodes on the network to know which node will actually invoke the plugin and hence when they should be looking for PoP (proof of plugin) in the blockchain. By having the plugin run in a trusted framework, eg. NXTcore, proof of plugin could be as simple as verifying hash for the content of the email.
Sorry for mixing metaphors a bit in the above. It helps me to think in terms of a specific function when thinking about abstractions. Also, I am sure there are some (many?) technical issues with my proposal as it is.
My hope is that my initial proposal is close enough to the actual solution that allows us to find the perfect solution.
James