## Summary - 2D 픽셀아트 가상 오피스에서 AI 에이전트(Stock, Music)가 실제 작업 수행 - FastAPI + WebSocket 실시간 상태 동기화 + 텔레그램 봇 양방향 알림/승인 - BaseAgent FSM (idle/working/waiting/reporting/break), 서비스 프록시 패턴 - Docker Compose 서비스 (port 18900) + Nginx WebSocket 프록시 ## Changes (13 commits) - Backend scaffold: config, db, models, Dockerfile - WebSocket manager + Service proxy - BaseAgent FSM + StockAgent + MusicAgent - Telegram bot + Scheduler - FastAPI main (REST + WS endpoints) - Infrastructure: docker-compose + nginx - Code review fixes: HTTPException, async polling, input validation Reviewed-on: #2
24 lines
840 B
Python
24 lines
840 B
Python
import os
|
|
|
|
# Service URLs (Docker internal network)
|
|
STOCK_LAB_URL = os.getenv("STOCK_LAB_URL", "http://localhost:18500")
|
|
MUSIC_LAB_URL = os.getenv("MUSIC_LAB_URL", "http://localhost:18600")
|
|
|
|
# Telegram
|
|
TELEGRAM_BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "")
|
|
TELEGRAM_CHAT_ID = os.getenv("TELEGRAM_CHAT_ID", "")
|
|
TELEGRAM_WEBHOOK_URL = os.getenv("TELEGRAM_WEBHOOK_URL", "")
|
|
|
|
# Database
|
|
DB_PATH = os.getenv("AGENT_OFFICE_DB_PATH", "/app/data/agent_office.db")
|
|
|
|
# CORS
|
|
CORS_ALLOW_ORIGINS = os.getenv(
|
|
"CORS_ALLOW_ORIGINS", "http://localhost:3007,http://localhost:8080"
|
|
)
|
|
|
|
# Idle break threshold (seconds)
|
|
IDLE_BREAK_THRESHOLD = int(os.getenv("IDLE_BREAK_THRESHOLD", "300")) # 5 min
|
|
BREAK_DURATION_MIN = int(os.getenv("BREAK_DURATION_MIN", "60")) # 1 min
|
|
BREAK_DURATION_MAX = int(os.getenv("BREAK_DURATION_MAX", "180")) # 3 min
|