Greetings tor-dev!
We've been working on improving PT reporting towards Tor so for instance Tor Browser can better inform the user or take actions based on the PT state when connecting to the network.
The following ticket summarize it: https://trac.torproject.org/projects/tor/ticket/28180
To achieve this, we are submitting these to torspec.git patches to extend both the pt-spec.txt and control-spec.txt to support such mechanism. This is the first draft.
Below is the link to the PT spec patch. It adds the EVENT message that for now is only used, as you will see, for reporting connection status message. However, you should see this EVENT message as extendable to whatever the PT would like to report to Tor that we can think of in the future:
https://gitweb.torproject.org/user/dgoulet/torspec.git/commit/?h=ticket28181...
The second, is simpler, it is how Tor will send it back to the control port:
https://gitweb.torproject.org/user/dgoulet/torspec.git/commit/?h=ticket28182...
Please, any questions or feedbacks is very welcome! The main idea here is to keep things simple and extendable.
Note that since Tor doesn't implement the PT 2.0 spec yet, we haven't done anything for that spec but after skimming the version 2, I think we can easily move this EVENT message concept if we want it.
Cheers! David