refactor: remove thread storage duplication, fetch from network
eliminates sqlite thread_messages table in favor of fetching thread context directly from atproto network on-demand.
changes:
- add build_thread_context() utility to extract thread messages from network data
- update message_handler to fetch threads via get_thread() instead of sqlite
- remove thread_messages table, add_message(), get_thread_messages(), get_thread_context()
- keep approval_requests table for future self-modification features
- keep turbopuffer episodic memory (semantic search, not duplicative)
rationale:
- thread data already exists on users' PDSs, aggregated by appview
- network is source of truth (no staleness from edits/deletions)
- simpler architecture, less maintenance
- aligns with atproto's "data on the web" philosophy
tested: bot runs successfully, polls notifications, no errors
see sandbox/THREAD_STORAGE_REFACTOR.md for full analysis
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>