🏗️ Architecture Overhaul
Introduces a shared service layer (services/) with 10 domain modules, eliminating duplicated business logic between CLI and MCP.
Added
- 10 service modules: chat, downloads, exports, notebooks, notes, research, sharing, sources, studio, errors
- Custom error hierarchy:
ServiceError,ValidationError,NotFoundError,CreationError,ExportError - 372 unit tests (up from 331)
Changed
- Strict layering:
cli/andmcp/are thin wrappers — neither imports fromcore/directly - Significant line count reductions across all MCP tools and CLI commands
- Updated contributing workflow (9-step process through service layer)
Stats
- 47 files changed, +4,967 / -1,783 lines
- Full E2E lifecycle verified (create → add sources → generate report → download → cleanup)