I have this implemented. Will include it as a part of tool_installaddon branch should we decide to actually use it (we don't really need to).
For the record:
(00:01:23) firstname.lastname@example.org/glum: More and more I have done, more and more I'm tempted not to use mdeploy.php for add-ons installation. On contrary to updates, new add-ons can be added only if the moodle is in "stable" state. Not in the middle of upgrade. Thence there is no real reason for using mdeploy.php.
(00:01:58) email@example.com/glum: on the other hand, it has everything implemented already ...