# =============================================================================
# Workflow Service Configuration
# =============================================================================

# Service Information
# Basic service identification and network configuration
SERVICE_SUB=spf
SERVICE_NAME=WorkFlow
SERVICE_LOCATION=hf
SERVICE_PORT=7880

# Logging Configuration
# Application logging level and optional log file path
LOG_LEVEL=ERROR
LOG_PATH=logs
# Whether to output logs to stdout, 1=enabled, 0=disabled, default: 0
LOG_STDOUT_ENABLE=0

# HTTP Client Configuration
# Connection pool size for HTTP client, default: 2000
HTTP_CLIENT_CONNECTION_POOL_SIZE=0
# DNS cache time for HTTP client, default: 300
HTTP_CLIENT_DNS_CACHE_TIME=300
# Use DNS cache for HTTP client, default: 1
HTTP_CLIENT_USE_DNS_CACHE=1

# =============================================================================
# Application Lifecycle Configuration
# =============================================================================

# Graceful Shutdown Configuration
# Shutdown interval and timeout settings for proper resource cleanup
SHUTDOWN_INTERVAL=2
SHUTDOWN_TIMEOUT=180

# =============================================================================
# Database Configuration
# =============================================================================

# MySQL Database Settings
# Primary database connection configuration for persistent data storage
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=admin
MYSQL_PASSWORD=admin
MYSQL_DB=workflow

# Redis Cache Settings
# Redis cluster configuration for caching, session management, and real-time data
# Only one cluster address and stand-alone address can be configured, and the cluster address has high priority.
# Cluster address
REDIS_CLUSTER_ADDR=
# Stand-alone address
REDIS_ADDR=127.0.0.1:6379
REDIS_PASSWORD=
# Cache expiration time in seconds (1 hour = 3600 seconds)
REDIS_EXPIRE=3600

# =============================================================================
# OpenTelemetry Observability Configuration
# =============================================================================

# OTLP (OpenTelemetry Protocol) Configuration
# Distributed tracing and metrics collection settings
# OTLP endpoint for telemetry data submission
OTLP_ENDPOINT=127.0.0.1:4317
# Enable/disable telemetry reporting (1=enabled, 0=disabled)
OTLP_ENABLE=0
# OTLP headers for authentication
OTLP_HEADERS=

# Metrics Collection Configuration
# SDK metric reporting interval, recommended < 30000ms, default: 1000ms
OTLP_METRIC_EXPORT_INTERVAL_MILLIS=3000
# Metrics export timeout to server in milliseconds, default: 5000ms
OTLP_METRIC_EXPORT_TIMEOUT_MILLIS=3000
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_METRIC_TIMEOUT=3000

# Distributed Tracing Configuration
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_TRACE_TIMEOUT=3000
# Maximum queue size for BatchSpanProcessor data export, default: 2048
OTLP_TRACE_MAX_QUEUE_SIZE=2048
# Delay interval between consecutive exports in BatchSpanProcessor, default: 5000ms
OTLP_TRACE_SCHEDULE_DELAY_MILLIS=3000
# Maximum batch size for BatchSpanProcessor data export, default: 512
OTLP_TRACE_MAX_EXPORT_BATCH_SIZE=500
# Maximum allowed time for data export from BatchSpanProcessor, default: 30000ms
OTLP_TRACE_EXPORT_TIMEOUT_MILLIS=3000

# =============================================================================
# Object Storage Configuration
# =============================================================================

# Object Storage Service Settings
# Storage type options: ifly_gateway_storage (iFlytek), s3 (Amazon S3 compatible)
OSS_TYPE=s3
OSS_ENDPOINT=http://127.0.0.1:9000
OSS_ACCESS_KEY_ID=admin
OSS_ACCESS_KEY_SECRET=admin
OSS_BUCKET_NAME=workflow
# Download domain for S3, required when using S3 storage type
OSS_DOWNLOAD_HOST=http://127.0.0.1:9000
# File validity period for iFlytek object storage (in seconds)
OSS_TTL=157788000

# =============================================================================
# Message Queue
# =============================================================================

# Apache Kafka Configuration
# Message queue settings for asynchronous processing and event streaming
KAFKA_ENABLE=0
KAFKA_SERVERS=127.0.0.1:9092
KAFKA_TIMEOUT=10
KAFKA_TOPIC=spark-agent-builder

# =============================================================================
# External Service Configuration
# =============================================================================

# Code Executor Settings
  # Supported types: local, ifly, ifly-v2, langchain, e2b (default: local)
CODE_EXEC_TYPE=local
CODE_EXEC_URL=
# Code execution timeout in seconds, default: 10s
CODE_EXEC_TIMEOUT_SEC=10
CODE_EXEC_API_KEY=
CODE_EXEC_API_SECRET=

# Image Understanding Model Configuration
# Spark image model domain specifications for visual AI processing
SPARK_IMAGE_MODEL_DOMAIN=image,imagev3

# Knowledge Base Service Configuration
# Standard knowledge base recall service endpoint for document retrieval
KNOWLEDGE_BASE_URL=http://127.0.0.1:10007

# Advanced Knowledge Base Pro Service
# Enhanced knowledge base with agent chat capabilities
KNOWLEDGE_PRO_BASE_URL=http://127.0.0.1:10007

# Plugin Management Configuration
# Plugin version management and execution endpoints
PLUGIN_BASE_URL=http://127.0.0.1:18888

# Workflow Service Endpoint
# Internal workflow service URL for server-sent events
WORKFLOW_BASE_URL=http://127.0.0.1:7880

# Application Management Platform
# Platform integration credentials and endpoint for app lifecycle management
APP_MANAGE_PLAT_BASE_URL=http://127.0.0.1:5052
APP_MANAGE_PLAT_KEY=
APP_MANAGE_PLAT_SECRET=

# Agent Node Configuration
# Custom agent API endpoint for chat completions and AI interactions
AGENT_BASE_URL=http://127.0.0.1:17870

# Quick Thinking Workflow Configuration
# Specify workflows and models for fast inference and rapid response scenarios
QUICKLY_THINK_FLOW_IDS=
QUICKLY_THINK_MODELS=
QUICKLY_THINK_APPS=

# PostgreSQL Database Node Configuration
# External PostgreSQL service endpoint for DML operations and data queries
PGSQL_BASE_URL=http://127.0.0.1:7990

# File Type Support Configuration
FILE_POLICY=[{"category":"image","extensions":["jpg","jpeg","png","bmp"],"size":"1024*1024*50"},{"category":"pdf","extensions":["pdf"],"size":"1024*1024*50"},{"category":"doc","extensions":["docx","doc"],"size":"1024*1024*50"},{"category":"ppt","extensions":["ppt","pptx"],"size":"1024*1024*50"},{"category":"excel","extensions":["xls","xlsx","csv"],"size":"1024*1024*50"},{"category":"txt","extensions":["txt"],"size":"1024*1024*50"},{"category":"audio","extensions":["wav","mp3","flac","m4a","aac","ogg","wma","midi"],"size":"1024*1024*50"},{"category":"video","extensions":["mp4","mkv","wmv","avi","mov","flv"],"size":"1024*1024*500"},{"category":"subtitle","extensions":["srt","ass","ssa","vtt"],"size":"1024*1024*50"}]

# RPA Service
RPA_BASE_URL=http://127.0.0.1:17198

# MCP Service
MCP_BASE_URL=http://127.0.0.1:18888

# Memory Service
MEMORY_BASE_URL=http://127.0.0.1:16869
MEMORY_AUTH_KEY=
MEMORY_AUTH_SECRET=

# KnowledgeNode Intelligent Matching LLM Configuration
KNOWLEDGE_NODE_LLM_BASE_URL=
KNOWLEDGE_NODE_LLM_MODEL=
KNOWLEDGE_NODE_LLM_API_KEY=
KNOWLEDGE_NODE_LLM_TEMPERATURE=1.0
KNOWLEDGE_NODE_LLM_MAX_TOKENS=1024
KNOWLEDGE_NODE_LLM_TOP_K=3

# =============================================================================
# Content Audit and Security Configuration
# =============================================================================

# Enable/disable content audit, 1=enabled, 0=disabled
AUDIT_ENABLE=0
# iFlytek Content Audit Service
# Content moderation and audit service credentials for compliance and safety
IFLYTEK_AUDIT_APP_ID=
IFLYTEK_AUDIT_ACCESS_KEY_ID=
IFLYTEK_AUDIT_ACCESS_KEY_SECRET=
IFLYTEK_AUDIT_HOST=
