You can have IDE's that don't have quite this problem in environments like Smalltalk. Since you can see all of the source code, and easily tweak and debug the whole system, every part of the system is your API. Unfortunately, this can also result in hard to manage dependencies when people publish extensions.
The way to have the best of both worlds, is to have an environment as described above, then also have a community process that promotes innovative extensions and rewrites them into more conventional APIs. This way, such APIs respond to actual need and no genius system designer has to foresee all the ways people will want to extend a system in the future.