refactor: telegram + portfolio in-process (drop shared MCP)
Each bot now manages its own notification + portfolio aggregation: * TelegramClient calls the public Bot API directly via httpx, reading CERBERO_BITE_TELEGRAM_BOT_TOKEN / CERBERO_BITE_TELEGRAM_CHAT_ID from env. No credentials → silent disabled mode. * PortfolioClient composes DeribitClient + HyperliquidClient + the new MacroClient.get_asset_price/eur_usd_rate to expose equity (EUR) and per-asset exposure as the bot's own slice (no cross-bot view). * mcp-telegram and mcp-portfolio removed from MCP_SERVICES / McpEndpoints and the cerbero-bite ping CLI; health_check no longer probes portfolio. Docs (02/04/06/07) and docker-compose updated to reflect the new architecture. 353/353 tests pass; ruff clean; mypy src clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ from cerbero_bite.config.mcp_endpoints import (
|
||||
|
||||
def test_defaults_match_known_docker_dns() -> None:
|
||||
assert DEFAULT_ENDPOINTS["deribit"] == "http://mcp-deribit:9011"
|
||||
assert DEFAULT_ENDPOINTS["telegram"] == "http://mcp-telegram:9017"
|
||||
assert DEFAULT_ENDPOINTS["sentiment"] == "http://mcp-sentiment:9014"
|
||||
|
||||
|
||||
def test_load_endpoints_uses_defaults_when_env_empty() -> None:
|
||||
@@ -72,5 +72,7 @@ def test_load_token_raises_when_file_empty(tmp_path: Path) -> None:
|
||||
|
||||
|
||||
def test_mcp_services_table_is_complete() -> None:
|
||||
expected = {"deribit", "hyperliquid", "macro", "sentiment", "telegram", "portfolio"}
|
||||
# Telegram and Portfolio are now in-process and must NOT be listed
|
||||
# as shared MCP services.
|
||||
expected = {"deribit", "hyperliquid", "macro", "sentiment"}
|
||||
assert set(MCP_SERVICES) == expected
|
||||
|
||||
Reference in New Issue
Block a user