Memory System: - Add category-based memory storage (company, tech, role, location, server) - Silent background saving via saveMemorySilently() - Category-based overwrite (same category replaces old memory) - Server-related pattern detection (AWS, GCP, k8s, traffic info) - Memory management tool (list, delete) Troubleshoot Agent: - Session-based troubleshooting conversation (KV, 1h TTL) - 20-year DevOps/SRE expert persona - Support for server/infra, domain/DNS, code/deploy, network, database issues - Internal tools: search_solution (Brave), lookup_docs (Context7) - Auto-trigger on error-related keywords - Session completion and cancellation support Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
2.3 KiB
TOML
65 lines
2.3 KiB
TOML
name = "telegram-summary-bot"
|
|
main = "src/index.ts"
|
|
compatibility_date = "2024-01-01"
|
|
|
|
[ai]
|
|
binding = "AI"
|
|
|
|
[vars]
|
|
ENVIRONMENT = "production"
|
|
SUMMARY_THRESHOLD = "50" # 프로필 업데이트 주기 (메시지 수)
|
|
MAX_SUMMARIES_PER_USER = "1" # 유지할 프로필 버전 수
|
|
N8N_WEBHOOK_URL = "https://n8n.anvil.it.com" # n8n 연동 (선택)
|
|
# Admin IDs moved to secrets (see bottom of file)
|
|
|
|
# API Endpoints
|
|
OPENAI_API_BASE = "https://gateway.ai.cloudflare.com/v1/d8e5997eb4040f8b489f09095c0f623c/telegram-bot/openai"
|
|
NAMECHEAP_API_URL = "https://namecheap-api.anvil.it.com"
|
|
WHOIS_API_URL = "https://whois-api-kappa-inoutercoms-projects.vercel.app"
|
|
CONTEXT7_API_BASE = "https://context7.com/api/v2"
|
|
BRAVE_API_BASE = "https://api.search.brave.com/res/v1"
|
|
WTTR_IN_URL = "https://wttr.in"
|
|
HOSTING_SITE_URL = "https://hosting.anvil.it.com"
|
|
CLOUD_ORCHESTRATOR_URL = "https://cloud-orchestrator.kappa-d8e.workers.dev"
|
|
|
|
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "telegram-conversations"
|
|
database_id = "c285bb5b-888b-405d-b36f-475ae5aed20e"
|
|
|
|
[[kv_namespaces]]
|
|
binding = "RATE_LIMIT_KV"
|
|
id = "15bcdcbde94046fe936c89b2e7d85b64"
|
|
preview_id = "0d3af750739e40d4a0324889564d74a7"
|
|
|
|
[[kv_namespaces]]
|
|
binding = "SESSION_KV"
|
|
id = "24ee962396cc4e9ab1fb47ceacf62c7d"
|
|
preview_id = "302ad556567447cbac49c20bded4eb7e"
|
|
|
|
# Email Worker 설정 (SMS → 메일 수신)
|
|
# Cloudflare Dashboard에서 Email Routing 설정 필요:
|
|
# 1. Email > Email Routing > Routes
|
|
# 2. deposit@your-domain.com → Worker: telegram-summary-bot
|
|
|
|
# Service Binding (Worker-to-Worker 통신)
|
|
[[services]]
|
|
binding = "CLOUD_ORCHESTRATOR"
|
|
service = "cloud-orchestrator"
|
|
|
|
# Cron Trigger: 매일 자정(KST) 실행 - 24시간 경과된 입금 대기 자동 취소
|
|
[triggers]
|
|
crons = ["0 15 * * *"] # UTC 15:00 = KST 00:00
|
|
|
|
# Secrets (wrangler secret put 으로 설정):
|
|
# - BOT_TOKEN: Telegram Bot Token
|
|
# - WEBHOOK_SECRET: Webhook 검증용 시크릿
|
|
# - OPENAI_API_KEY: OpenAI API 키
|
|
# - NAMECHEAP_API_KEY: namecheap-api 래퍼 인증 키 (도메인 추천용)
|
|
# - NAMECHEAP_API_KEY_INTERNAL: Namecheap API 키 (내부용)
|
|
# - BRAVE_API_KEY: Brave Search API 키
|
|
# - DEPOSIT_API_SECRET: Deposit API 인증 키 (namecheap-api 연동)
|
|
# - DOMAIN_OWNER_ID: 도메인 관리 권한 Telegram ID (보안상 secrets 권장)
|
|
# - DEPOSIT_ADMIN_ID: 예치금 관리 권한 Telegram ID (보안상 secrets 권장)
|