# ENV File

# Load machine-local secrets before defining any derived environment variables.
[ -f "$HOME/.zsh_secrets" ] && source "$HOME/.zsh_secrets"

export GOGC=500

# CodeGraphContext defaults
export CGC_RUNTIME_DB_TYPE=kuzudb
export KUZUDB_PATH="$HOME/.codegraphcontext/kuzudb"

export PATH="$HOME/.opencode/bin:$PATH"
export OPENCHAMBER_HOST="${OPENCHAMBER_HOST:-0.0.0.0}"
export VAULT_ADDR="${VAULT_ADDR:-http://192.168.30.53:8200}"
export PLANNOTATOR_PORT="${PLANNOTATOR_PORT:-9999}"

# Derived environment variables that may depend on machine-local secrets.
[ -n "${AZURE_URL:-}" ] && export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME="$AZURE_URL"
[ -n "${AZURE_URL:-}" ] && export AZURE_RESOURCE_NAME="$AZURE_URL"
[ -n "${VM_SUDO_PASS:-}" ] && export OPENCHAMBER_UI_PASSWORD="$VM_SUDO_PASS"
[ -n "${AZURE_OPENAI_API_KEY:-}" ] && export FOUNDRY_ANTHROPIC_API_KEY="$AZURE_OPENAI_API_KEY"
[ -n "${AZURE_OPENAI_API_KEY:-}" ] && export CHROMA_OPENAI_API_KEY="$AZURE_OPENAI_API_KEY"
[ -n "${OUTLINE_MOKU_TOKEN:-}" ] && export OUTLINE_MOKU_AUTHORIZATION="Bearer $OUTLINE_MOKU_TOKEN"
