A wiki in which every page can define an object:
I believe that http://www.flexwiki.com/ - listed on the page TipsForWardAtMicrosoft - is somewhat programmable. I don't know if it meets your full criteria.
It doesn't. But VistaSmalltalk in its "code wiki" incarnation seems pretty close ... see http://vistasmalltalk.wordpress.com/page/3/ for a sketch ...