@ssastry says,
This is a tangential comment ... but I have been watching the ext api exports expanding slowly ... I am mildly worried that, without some attention, a lot of parsoid code will get exposed through these interfaces and extensions will start doing obscure things through whatever internals they can get their grubby hands on ... i.e. one complaint i have about php parser hooks is that they expose parsing internals of the php parser that can't be duplicated elsewhere (ex: parsoid). We don't that happening here now. So, we need to take a step back at some point soon and look at the abstract interface we want to expose to extensions and think about how to make sure they have just that and nothing more.
in https://gerrit.wikimedia.org/r/#/c/281076/10/lib/config/extapi.js