Files
basicmachines-co-basic-memory/src/basic_memory
claude[bot] 08c9273328 feat: add composition roots (api/container.py, mcp/container.py, cli/container.py)
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>
2025-12-31 22:04:51 +00:00
..
2025-12-28 16:05:07 -06:00