feat: Add Alateya, Clan, Eonarch agents + fix gateway-router connection
## Agents Added - Alateya: R&D, biotech, innovations - Clan (Spirit): Community spirit agent - Eonarch: Consciousness evolution agent ## Changes - docker-compose.node1.yml: Added tokens for all 3 new agents - gateway-bot/http_api.py: Added configs and webhook endpoints - gateway-bot/clan_prompt.txt: New prompt file - gateway-bot/eonarch_prompt.txt: New prompt file ## Fixes - Fixed ROUTER_URL from :9102 to :8000 (internal container port) - All 9 Telegram agents now working ## Documentation - Created PROJECT-MASTER-INDEX.md - single entry point - Added various status documents and scripts Tokens configured: - Helion, NUTRA, Agromatrix (existing) - Alateya, Clan, Eonarch (new) - Druid, GreenFood, DAARWIZZ (configured)
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
FastAPI app instance for Gateway Bot
|
||||
"""
|
||||
import logging
|
||||
import asyncio
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from http_api import router as gateway_router
|
||||
from http_api_doc import router as doc_router
|
||||
from telegram_history_recovery import auto_recover_on_startup_all_agents
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
@@ -28,6 +30,22 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Startup event: auto-recover Telegram history
|
||||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
"""Run on application startup"""
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.info("🚀 Bot Gateway startup initiated")
|
||||
|
||||
# Auto-recover Telegram history for all agents
|
||||
try:
|
||||
logger.info("📊 Starting automatic Telegram history check...")
|
||||
result = await auto_recover_on_startup_all_agents()
|
||||
logger.info(f"✅ Telegram history check completed: {result.get('status')}")
|
||||
except Exception as e:
|
||||
logger.error(f"❌ Failed to run history recovery on startup: {e}")
|
||||
# Don't block startup if recovery fails
|
||||
|
||||
# Include gateway routes
|
||||
app.include_router(gateway_router, prefix="", tags=["gateway"])
|
||||
app.include_router(doc_router, prefix="", tags=["docs"])
|
||||
|
||||
Reference in New Issue
Block a user