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:
@@ -1,15 +1,17 @@
|
||||
"""
|
||||
Bot Gateway Service
|
||||
"""Bot Gateway Service
|
||||
Entry point for Telegram/Discord webhook handling
|
||||
"""
|
||||
import logging
|
||||
import argparse
|
||||
import asyncio
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
import uvicorn
|
||||
|
||||
from .http_api import router as gateway_router
|
||||
from .telegram_history_recovery import auto_recover_on_startup_all_agents
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(
|
||||
@@ -36,6 +38,21 @@ def create_app() -> FastAPI:
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Startup event: auto-recover Telegram history
|
||||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
"""Run on application startup"""
|
||||
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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user