Adds composition root containers for API, MCP, and CLI entrypoints to
centralize configuration loading, logging initialization, and runtime
mode selection. This reduces coupling between modules and runtime concerns.
Changes:
- Add api/container.py: API composition root with config + logging
- Add mcp/container.py: MCP composition root with config + logging + client factories
- Add cli/container.py: CLI composition root with config + logging + client factories
- Refactor api/app.py to use APIContainer.create()
- Refactor mcp/server.py to use MCPContainer.create()
- Refactor mcp/async_client.py to delegate to MCPContainer for runtime mode
Containers own:
- Reading ConfigManager + environment variables
- Selecting runtime mode (cloud/local/test)
- Providing factories (httpx clients)
- Initializing logging for each entrypoint
This is foundational work that enables further refactoring to remove
direct ConfigManager access from downstream modules.
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>