I know this is a webdev project anyway, but I imagine embedding code would mean, in practice, embedding Javascript. Then the whole thing becomes 100% tied to the web and to modern browsers, which is a shame. Such blocks could be used from native applications, bots, or TUI programs, but that ship has probably sailed already.
We're focusing on the browser context at first, but expect the principles of the interface between a block and application (if not the implementation details) should be applicable to other environments - very briefly mentioned here https://blockprotocol.org/docs/faq#what-about-non-web-contex...