snapshot: NODE1 production state 2026-02-09
Complete snapshot of /opt/microdao-daarion/ from NODE1 (144.76.224.179).
This represents the actual running production code that has diverged
significantly from the previous main branch.
Key changes from old main:
- Gateway (http_api.py): expanded from ~40KB to 164KB with full agent support
- Router: new /v1/agents/{id}/infer endpoint with vision + DeepSeek routing
- Behavior Policy: SOWA v2.2 (3-level: FULL/ACK/SILENT)
- Agent Registry: config/agent_registry.yml as single source of truth
- 13 agents configured (was 3)
- Memory service integration
- CrewAI teams and roles
Excluded from snapshot: venv/, .env, data/, backups, .tgz archives
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,13 +2,11 @@
|
||||
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,
|
||||
@@ -30,22 +28,6 @@ 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