These patches provide a working draft of the downstream API described in #2 (closed).
This will create a new commit in order to revert the existing changes.