# ==============================================================================
# MORGANA - DEVELOPMENT ENVIRONMENT
# ==============================================================================
# For building Morgana and Cauldron from source code.
# Versions are auto-generated from Directory.Build.props into .env.versions
# 
# Usage:
#   1. Copy this file to .env
#   2. Fill in your secrets below
#   3. Build Morgana:  dotnet build ./Morgana
#   4. Build Cauldron: dotnet build ./Channels/Cauldron
#   5. Build Rune:     dotnet build ./Channels/Rune
#   6. Build docker image:  docker compose --env-file .env --env-file .env.versions build
#   7. Manage docker image: docker compose --env-file .env --env-file .env.versions up|down|...
#      Note: `up` starts Morgana + Cauldron only. Rune's Spectre.Console TUI
#      needs its own terminal, so launch it interactively in a separate shell:
#        docker compose --env-file .env --env-file .env.versions run --rm --service-ports --use-aliases rune
#      `--use-aliases` is mandatory: `compose run` skips network aliases by
#      default, so without it Morgana's webhook callback to http://rune:5003
#      fails DNS resolution.

# ==============================================================================
# ENCRYPTION
# ==============================================================================
# AES-256 key (32 bytes) encoded in Base64 for encrypting SQLite databases
# Generate a new key with: 
#   Linux/Mac:   openssl rand -base64 32
#   PowerShell:  $bytes = New-Object byte[] 32; [System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes); [Convert]::ToBase64String($bytes)
ENCRYPTIONKEY=YOUR_BASE64_ENCODED_256_BIT_KEY_HERE

# ==============================================================================
# JWT AUTHENTICATION
# ==============================================================================
# HMAC-SHA256 symmetric key for JWT token signing between Cauldron and Morgana
# Generate a new key with:
#   Linux/Mac:   openssl rand -base64 32
#   PowerShell:  $bytes = New-Object byte[] 32; [System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes); [Convert]::ToBase64String($bytes)
JWT_SYMMETRIC_KEY=YOUR_BASE64_ENCODED_256_BIT_KEY_HERE

# ==============================================================================
# LLM PROVIDER
# ==============================================================================
# Choose LLM provider: "anthropic", "azureopenai", "ollama", "openai"
#LLM_PROVIDER=azureopenai

# ==============================================================================
# ANTHROPIC CONFIGURATION (required if LLM_PROVIDER=anthropic)
# ==============================================================================
#ANTHROPIC_APIKEY=sk-ant-api03-YOUR_KEY_HERE
#ANTHROPIC_MODEL=claude-YOUR_MODEL_HERE

# ==============================================================================
# AZURE OPENAI CONFIGURATION (required if LLM_PROVIDER=azureopenai)
# ==============================================================================
#AZUREOPENAI_APIKEY=YOUR_AZURE_OPENAI_KEY_HERE
#AZUREOPENAI_DEPLOYMENTNAME=YOUR_AZURE_OPENAI_DEPLOYMENT_HERE
#AZUREOPENAI_ENDPOINT=https://your-resource-name.openai.azure.com

# ==============================================================================
# OLLAMA CONFIGURATION (required if LLM_PROVIDER=ollama)
# ==============================================================================
#OLLAMA_ENDPOINT=http://localhost:11434/
#OLLAMA_MODEL=YOUR_OLLAMA_MODEL_HERE

# ==============================================================================
# OPENAI CONFIGURATION (required if LLM_PROVIDER=openai)
# ==============================================================================
#OPENAI_APIKEY=YOUR_OPENAI_KEY_HERE
#OPENAI_MODEL=YOUR_OPENAI_MODEL_HERE