# OpenRouter API Key (https://openrouter.ai/keys)
OPENROUTER_API_KEY=sk-or-v1-...

# Default model (any OpenRouter-supported model)
# Examples: google/gemini-2.5-flash, google/gemini-2.5-flash-lite, anthropic/claude-sonnet-5
OPENROUTER_MODEL=google/gemini-2.5-flash
OPENROUTER_TIMEOUT_SECONDS=120

# Agent defaults
AGENT_MAX_ITERATIONS=20
AGENT_TEMPERATURE=0.7

# find_agent only (read by agents/find_agent/runtime.py)
# 单个 find_agent 最长运行 10 分钟，超时后标记失败并继续下一条
FIND_AGENT_TIMEOUT_SECONDS=600

# Skills directory (relative to project root or absolute path)
SKILLS_DIR=skills

# Logging
LOG_ENABLED=true
LOGS_DIR=logs

# 百炼 API Key
DASHSCOPE_API_KEY=sk-ws-...

# MySQL
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=
MYSQL_DATABASE=supply_agent
MYSQL_CONNECTION_BUDGET=40
MYSQL_POOL_SIZE=1
MYSQL_POOL_SIZE_API=6
MYSQL_POOL_SIZE_CONTROL=1
MYSQL_MAX_OVERFLOW=0
MYSQL_POOL_TIMEOUT_SECONDS=10
MYSQL_POOL_RECYCLE_SECONDS=1800
MYSQL_CONNECT_TIMEOUT_SECONDS=10
MYSQL_READ_TIMEOUT_SECONDS=30
MYSQL_WRITE_TIMEOUT_SECONDS=30
MYSQL_OPERATIONAL_RESERVE=4
MYSQL_ECHO=false

# Local web authentication. The bootstrap account is only created when the
# username does not already exist; changing these values will not reset it.
AUTH_SESSION_HOURS=12
AUTH_COOKIE_SECURE=false
AUTH_BOOTSTRAP_ADMIN_USERNAME=admin
AUTH_BOOTSTRAP_ADMIN_PASSWORD=
AUTH_BOOTSTRAP_ADMIN_DISPLAY_NAME=系统管理员

# ODPS (MaxCompute)
ODPS_ACCESS_ID=
ODPS_ACCESS_KEY=
ODPS_PROJECT=
ODPS_ENDPOINT=https://service.cn.maxcompute.aliyun.com/api

# Scheduler（独立进程；供给流水线每天 15:00 Asia/Shanghai 触发）
SCHEDULER_ENABLED=false
SCHEDULER_TIMEZONE=Asia/Shanghai
SCHEDULER_CRON_HOUR=15
SCHEDULER_CRON_MINUTE=0

# Pipeline control plane
PROCESS_ROLE=api
DATABASE_AUTO_CREATE=false
PIPELINE_WORKER_PROCESSES=4
PIPELINE_MAX_ACTIVE_STEPS=4
PIPELINE_WORKER_POLL_SECONDS=2
PIPELINE_LEASE_SECONDS=120
PIPELINE_HEARTBEAT_SECONDS=30
PIPELINE_RECONCILE_SECONDS=60
PIPELINE_MISSED_RUN_GRACE_SECONDS=600
PIPELINE_SHUTDOWN_GRACE_SECONDS=300
PIPELINE_WARN_AFTER_HOURS=12
PIPELINE_CRITICAL_BEFORE_NEXT_MINUTES=120
PIPELINE_FINAL_WARN_BEFORE_NEXT_MINUTES=30
PIPELINE_LOG_DIR=logs/pipeline
# Aliyun OSS (agent 运行日志可视化上传；qwen 视频截断后片段也上传到此 bucket)
ALIYUN_OSS_ACCESS_KEY_ID=
ALIYUN_OSS_ACCESS_KEY_SECRET=
ALIYUN_OSS_REGION=cn-hangzhou
ALIYUN_OSS_BUCKET=art-pubbucket
ALIYUN_OSS_ROOT_PREFIX=supply_agent
# 手动上传日志专用 OSS 目录（与 Agent 自动上传 / MySQL oss_logs 路径分离）
ALIYUN_OSS_MANUAL_LOG_PREFIX=supply_agent/manual_logs
ALIYUN_OSS_PUBLIC_BASE_URL=http://rescdn.yishihui.com
ALIYUN_OSS_CONNECT_TIMEOUT_SECONDS=30
LOG_OSS_UPLOAD_ENABLED=true

# AIGC platform (视频爬取/发布计划；需配置 token，默认真实调用接口)
AIGC_API_TOKEN=
