How bb, the programmable IDE for coding agents, is built

I read the bb source to follow one coding-agent task through its server, SQLite database, host daemon, provider runtime, event stream, and app.